Delivery and retries
Each event triggers an HTTPPOST with Content-Type: application/json. Your endpoint should respond with a 2xx status as quickly as possible — long-running work belongs on a queue downstream of your receiver.
If delivery fails (non-2xx, timeout, connection error), Mobula retries with exponentially increasing delays. Defaults: up to 2 retries, starting at 1 second, capped at 30 seconds, with a total budget of 300 seconds. Override per-webhook via RetrySettingsInput.
Delivery is at-least-once. The envelope’s deduplicationId is deterministic — store it on your side and skip events you’ve already processed.
Message structure
Every payload — across all four categories, single and batch — carries the same top-level keys:| Field | Type | Notes |
|---|---|---|
type | string | Category id. Single delivery: TOKEN_PAIR_EVENT, TOKEN_PRICE_EVENT, MARKET_CAP_EVENT, TOKEN_TRANSFER_EVENT. Batch delivery: same names with _BATCH suffix. |
webhookId | string | The webhook id (matches the value returned by createWebhooks / getWebhooks). |
webhook | object | { id, name }. Always present on single envelopes. On batch envelopes only TOKEN_TRANSFER_EVENT_BATCH includes it. |
groupId | string | null | The webhook’s bucketKey.bucketId. For TOKEN_PRICE_EVENT and MARKET_CAP_EVENT falls back to the webhook id when no bucket is set. |
deduplicationId | string | Stable per-event id. Replays use the same value. Shape varies per category — see each section. |
hash | string | sha256(securityToken + deduplicationId) (hex). Lets you verify the envelope was built with the secret you supplied. See Hash verification. |
data | object | array | Category payload. Object on single delivery, array on batch. |
publishingType: BATCH on createWebhooks to opt into batched envelopes; the default is SINGLE (one envelope per match).
Hash verification
Each webhook message includes ahash field you can use to verify the message came from Mobula and hasn’t been tampered with. This protects your endpoint from spoofed or replayed requests.
The hash is a SHA-256 digest of your webhook’s securityToken concatenated with the message’s deduplicationId. To verify, compute the same hash on your server and compare it to the value in the payload. If they match, the message is authentic.
Event types
TOKEN_PAIR_EVENT
Pair-level events (swap / mint / burn) on a watched token, pair, exchange, or maker. When to use it- Tracking every trade made by a specific wallet
- Monitoring high-value swaps on a single token or pair
- Feeding a live trade tape for a specific pool
- Alerting on liquidity events (mints, burns)
networkId,tokenAddress,pairAddress,exchangeAddress,makereventType— one ofSWAP,MINT,BURNswapValue— USD threshold (gt/gte/lt/lte/eq)fdvMarketCapUsd,circulatingMarketCapUsd,liquidityUsd,volumeUsd— additional thresholds
Creation example
Message payload (single event)
deduplicationId = <webhookId>-<pairId>-<sortKey>, where sortKey = blockNumber#txIndex#logIndex#supplementalIndex (each segment zero-padded).
Message payload (batch version)
deduplicationId = <webhookId>-batch-<paddedBlockNumber> (block of the first event in the batch).
TOKEN_PRICE_EVENT
Single-token USD-price thresholds. Fires when a swap involving the watched token crosses the configuredpriceUsd.
When to use it
- Price alerts for a single token (e.g. “WETH above $4000”)
- Watchlist-style notifications for a small set of tokens
- Dashboard price tickers where polling is not acceptable
address(required),networkId(required)priceUsd(required) —gt/gte/lt/lte/eq
Creation example
Message payload (single event)
deduplicationId = <webhookId>-<id>-<sortKey> (4-segment sortKey, same shape as TOKEN_PAIR_EVENT).
Message payload (batch version)
deduplicationId = <webhookId>-batch-<paddedBlockNumber>.
MARKET_CAP_EVENT
FDV / circulating market-cap thresholds. When to use it- Market-cap milestone alerts (e.g. “PEPE crosses $5B FDV”)
- Large-cap filtering logic for automated tools
- Portfolio-level risk dashboards
tokenAddress(required),networkId(required)fdvMarketCapUsd,circulatingMarketCapUsd— at least one threshold expected- Optional pair-level:
pairAddress,liquidityUsd,volumeUsd
Creation example
Message payload (single event)
deduplicationId = <webhookId>-<priceModel.id>-<sortKey>. Note the 3-segment sortKey here: blockNumber#txIndex#logIndex (no supplementalIndex).
Message payload (batch version)
deduplicationId = <webhookId>-batch-<paddedBlockNumber>.
TOKEN_TRANSFER_EVENT
ERC-20 / SPL transfers (and native-token transfers). When to use it- Monitoring whale wallet movements
- Triggering on-chain alerts for your own wallets
- Watching exchange hot wallets or bridge addresses
networkId,tokenAddress,addressdirection—TO,FROM, or both
Creation example
Message payload (single event)
deduplicationId:
- ERC-20 / SPL (with
logIndex):<webhookId>-<txHash>-<logIndex> - Native transfers (no
logIndex):<webhookId>-<txHash>-n<sha256(from|to|amount)[:16]>
Message payload (batch version)
deduplicationId = <webhookId>-batch-<paddedBlockNumber>.