Returns a user's list of webhooks.
This endpoint is available on Defined Growth and Enterprise Plans
Endpoint: getWebhooks
Method: POST
Arguments
Response
Name | Type | Description |
---|---|---|
alertRecurrence | AlertRecurrence! | The recurrence of the webhook. Can be |
callbackUrl | String! | The url to which the webhook message should be sent. |
conditions | WebhookCondition! | The conditions which must be met in order for the webhook to send a message. |
created | Int! | The unix timestamp for the time the webhook was created. |
groupId | String | The webhook group ID used to group webhooks together for ordered message sending. |
id | String! | The ID of the webhook. |
name | String! | The given name of the webhook. |
retrySettings | RetrySettings | The settings for retrying failed webhook messages. |
status | String! | The status of the webhook. Can be |
webhookType | WebhookType! | The type of webhook. Can be |
Example
Query
mutation GetWebhooks {
getWebhooks(cursor: "", limit: 10) {
cursor
items {
alertRecurrence
callbackUrl
conditions {
... on PriceEventWebhookCondition {
__typename
networkId {
eq
}
priceUsd {
eq
gt
gte
lt
lte
}
tokenAddress {
eq
}
}
... on DecodedLogWebhookCondition {
event
decodingId {
eq
}
address {
eq
}
eventName {
eq
}
}
... on DecodedCallWebhookCondition {
input
address {
eq
}
from {
eq
}
decodingId {
eq
}
methodId {
eq
}
methodName {
eq
}
output
to {
eq
}
}
}
created
groupId
id
name
status
webhookType
}
}
}
Response
{
"data": {
"getWebhooks": {
"cursor": null,
"items": [
{
"alertRecurrence": "ONCE",
"callbackUrl": "https://myserver.mydomain.com/my-webhook-handler",
"conditions": {
"input": "{\"amount\":{\"gt\":\"100000000\"}}",
"address": null,
"from": null,
"decodingId": {
"eq": "uniswapv3:pool:1"
},
"methodId": null,
"methodName": {
"eq": "mint"
},
"output": null,
"to": null
},
"created": 1676662026,
"groupId": "uniswap",
"id": "e1034c16-f873-4051-84b7-e525ea0998c6",
"name": "uniswapv3 swap event greater than 100000000",
"status": "ACTIVE",
"webhookType": "DECODED_CALL"
},
{
"alertRecurrence": "ONCE",
"callbackUrl": "https://myserver.mydomain.com/my-webhook-handler",
"conditions": {
"event": "{\"amount0\":{\"gt\":\"100000000\"}}",
"decodingId": {
"eq": "uniswapv3:pool:1"
},
"address": {
"eq": "0x824a30f2984f9013f2c8d0a29c0a3cc5fd5c0673"
},
"eventName": {
"eq": "Swap"
}
},
"created": 1676662026,
"groupId": "uniswap",
"id": "fc91e96b-8994-4bd8-b366-3769619292ee",
"name": "uniswapv3 swap event",
"status": "ACTIVE",
"webhookType": "DECODED_LOG"
},
{
"alertRecurrence": "INDEFINITE",
"callbackUrl": "https://myserver.mydomain.com/my-webhook-handler",
"conditions": {
"__typename": "PriceEventWebhookCondition",
"networkId": {
"eq": 1
},
"priceUsd": {
"eq": null,
"gt": "0",
"gte": null,
"lt": null,
"lte": null
},
"tokenAddress": {
"eq": "0x5a98fcbea516cf06857215779fd812ca3bef1b32"
}
},
"created": 1676662026,
"groupId": "test-group",
"id": "44c4e700-4c09-401e-a6d8-b22bd6935d41",
"name": "uniswap",
"status": "ACTIVE",
"webhookType": "PRICE_EVENT"
}
]
}
}
}
Ask questions, share what you're working on and request new features