Documentation Index
Fetch the complete documentation index at: https://docs.mobula.io/llms.txt
Use this file to discover all available pages before exploring further.
Webhook callbacks are signed with the per-stream
securityToken you provide. Always verify it server-side before trusting the payload.createWebhooks registers one or more webhook subscriptions in a single call. Each top-level input field corresponds to a webhook category; you can mix and match in the same request, and the response groups the created webhooks by category in matching arrays.
Returns
Created webhooks, grouped by category. See CreateWebhooksOutput.
Show View fields (CreateWebhooksOutput)
Show View fields (CreateWebhooksOutput)
Reserved for legacy price webhooks. Always empty for new categories below; kept for response stability.
Webhooks created from
tokenPairEventWebhooksInput.Webhooks created from
marketCapWebhooksInput.Webhooks created from
tokenPriceEventWebhooksInput.Webhooks created from
tokenTransferEventWebhooksInput.Show View fields (Webhook, each element)
Show View fields (Webhook, each element)
Stream ID. Pass to deleteWebhooks to revoke.
Category of the webhook. See WebhookType.
Caller-supplied name.
Unix seconds at creation.
INDEFINITE keeps the webhook firing forever, ONCE auto-archives after the first delivery.URL deliveries are POSTed to.
ACTIVE immediately after creation.The matching rule, returned as a typed union. See WebhookCondition.
Effective retry policy. See RetrySettings.
SINGLE (one event per delivery, default) or BATCH.Arguments
Bundle of category-specific webhook inputs. See CreateWebhooksInput.
Show CreateWebhooksInput
Show CreateWebhooksInput
Token pair event webhooks (swaps, mints, burns, etc.). See CreateTokenPairEventWebhooksInput.
Show CreateTokenPairEventWebhooksInput
Show CreateTokenPairEventWebhooksInput
List of token pair webhooks to create. See CreateTokenPairEventWebhookInput.
Show CreateTokenPairEventWebhookInput (each element)
Show CreateTokenPairEventWebhookInput (each element)
Caller-supplied name.
HTTPS URL to deliver events to.
Secret echoed in delivery headers; verify it server-side.
Matching rule. Required:
networkId ({ oneOf: [1, 137] }). Optional: tokenAddress, pairAddress, exchangeAddress, maker, eventType ({ oneOf: [SWAP, MINT, ...] }), swapValue, fdvMarketCapUsd, circulatingMarketCapUsd, liquidityUsd, volumeUsd. Full schema: TokenPairEventWebhookConditionInput.Retry policy override. See RetrySettingsInput.
Preferred bucket form. See BucketKeyInput.
When
true, returns the existing webhook if one with identical callbackUrl, conditions, publishingType and alertRecurrence already exists for this API key.Market cap threshold webhooks. See CreateMarketCapWebhooksInput.
Show CreateMarketCapWebhooksInput
Show CreateMarketCapWebhooksInput
List of market cap webhooks to create. See CreateMarketCapWebhookInput.
Show CreateMarketCapWebhookInput (each element)
Show CreateMarketCapWebhookInput (each element)
Caller-supplied name.
HTTPS URL to deliver events to.
Secret echoed in delivery headers.
INDEFINITE or ONCE.Matching rule. Required:
tokenAddress and networkId ({ eq: 1 } for Ethereum). Optional: fdvMarketCapUsd, circulatingMarketCapUsd, pairAddress, liquidityUsd, volumeUsd. Full schema: MarketCapEventWebhookConditionInput.Retry policy override.
Preferred bucket form.
SINGLE (default) or BATCH.Reuse an existing matching webhook when
true.Token price threshold webhooks. See CreateTokenPriceEventWebhooksInput.
Show CreateTokenPriceEventWebhooksInput
Show CreateTokenPriceEventWebhooksInput
List of token price webhooks to create. See CreateTokenPriceEventWebhookInput.
Show CreateTokenPriceEventWebhookInput (each element)
Show CreateTokenPriceEventWebhookInput (each element)
Caller-supplied name.
HTTPS URL to deliver events to.
Secret echoed in delivery headers.
INDEFINITE or ONCE.Matching rule. Required:
address (token), networkId ({ eq: 1 }), priceUsd ({ gte: "0.01" }). Full schema: TokenPriceEventWebhookConditionInput.Retry policy override.
Preferred bucket form.
SINGLE (default) or BATCH.Reuse an existing matching webhook when
true.ERC-20 / SPL transfer webhooks. See CreateTokenTransferEventWebhooksInput.
Show CreateTokenTransferEventWebhooksInput
Show CreateTokenTransferEventWebhooksInput
List of token transfer webhooks to create. See CreateTokenTransferEventWebhookInput.
Show CreateTokenTransferEventWebhookInput (each element)
Show CreateTokenTransferEventWebhookInput (each element)
Caller-supplied name.
HTTPS URL to deliver events to.
Secret echoed in delivery headers.
INDEFINITE or ONCE.Matching rule. Required:
networkId ({ oneOf: [1, 137] }). Optional: tokenAddress, address (wallet to watch), direction ({ oneOf: [FROM] }, { oneOf: [TO] }, or both — see TokenTransferDirection). Full schema: TokenTransferEventWebhookConditionInput.Retry policy override.
Preferred bucket form.
SINGLE (default) or BATCH.Reuse an existing matching webhook when
true.Validation
securityTokenis required on every webhook input.- At least one network must be supplied via
conditions.networkId. Token price and market cap webhooks accept a single ID via{ eq: <id> }; pair and transfer webhooks accept multiple via{ oneOf: [<id>, ...] }. - When
bucketKeyis provided, bothbucketIdandbucketSortKeyare required. deduplicate: truereturns the existing webhook (instead of creating a duplicate) when an active webhook with identicalcallbackUrl,conditions,publishingType, andalertRecurrencealready exists for the calling API key.
Example
mutation CreateWebhooks($input: CreateWebhooksInput!) {
createWebhooks(input: $input) {
tokenPairEventWebhooks {
id
webhookType
name
callbackUrl
conditions {
... on TokenPairEventWebhookCondition {
networkId { oneOf }
eventType { oneOf }
}
}
}
marketCapWebhooks {
id
webhookType
}
tokenPriceEventWebhooks {
id
webhookType
}
tokenTransferEventWebhooks {
id
webhookType
}
}
}
Variables
{
"input": {
"tokenPairEventWebhooksInput": {
"webhooks": [
{
"name": "WETH big swaps",
"callbackUrl": "https://example.com/webhooks/mobula",
"securityToken": "whsec_REPLACE_ME",
"alertRecurrence": "INDEFINITE",
"conditions": {
"networkId": { "oneOf": [1] },
"tokenAddress": { "eq": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" },
"swapValue": { "gte": "10000" },
"eventType": { "oneOf": ["SWAP"] }
},
"publishingType": "SINGLE",
"deduplicate": true
}
]
},
"tokenPriceEventWebhooksInput": {
"webhooks": [
{
"name": "WETH crosses $4k",
"callbackUrl": "https://example.com/webhooks/mobula",
"securityToken": "whsec_REPLACE_ME",
"alertRecurrence": "ONCE",
"conditions": {
"address": { "eq": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" },
"networkId": { "eq": 1 },
"priceUsd": { "gte": "4000" }
}
}
]
}
}
}