Skip to content

Webhook

Listen to Blockchain Events with Webhooks

You can listen to transactions via webhooks using the Sequence Indexer. Our filters allow you to listen to events with a particular contract address and/or account address and specific token ids.

Registering a Webhook

Sequence Indexer AddWebhookListener Method:

  • Request: POST /rpc/Indexer/AddWebhookListener
  • Content-Type: application/json
  • Body (in JSON):
    • Url (string) -- the URL to send the webhook to
    • Filters ([]object) -- an array of filters
      • contractAddresses ([]string) -- a ERC20 / ERC721 / ERC1155 contract address
      • accounts ([]string) -- wallet addresses
      • tokenIDs ([]int) optional -- an array of token ids

One of contractAddresses, accounts must be provided in the filter.

Example: AddWebhookListener
cURL
curl -X POST -H "Content-Type: application/json" -H "X-Access-Key: c3bgcU3LkFR9Bp9jFssLenPAAAAAAAAAA" https://polygon-indexer.sequence.app/rpc/Indexer/AddWebhookListener -d '{ "url": "https://webhook.site/27c266b7-ee69-4046-8319-75ce91ec2bcf", "filters": [{"accounts": ["0x631998e91476DA5B870D741192fc5Cbc55F5a52E"]}]'

Now you can listen to events on the blockchain with your webhook.