Skip to main content
Mobula’s GraphQL webhooks let you receive on-chain events at a callback URL of your choice. After createWebhooks, Mobula POSTs a JSON envelope to that URL whenever a matching event is observed. This page documents the wire-level behaviour — what we send, how we sign and dedupe it, and the exact payload for each of the four supported categories. Related: createWebhooksgetWebhooksdeleteWebhooks.

Delivery and retries

Each event triggers an HTTP POST 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: Set publishingType: BATCH on createWebhooks to opt into batched envelopes; the default is SINGLE (one envelope per match).

Hash verification

Each webhook message includes a hash 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)
Filter conditions — see TokenPairEventWebhookConditionInput for the full schema.
  • networkId, tokenAddress, pairAddress, exchangeAddress, maker
  • eventType — one of SWAP, MINT, BURN
  • swapValue — 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 configured priceUsd. 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
Filter conditions — see TokenPriceEventWebhookConditionInput.
  • 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
Filter conditions — see MarketCapEventWebhookConditionInput.
  • 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
Filter conditions — see TokenTransferEventWebhookConditionInput.
  • networkId, tokenAddress, address
  • directionTO, 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>.