Subscriptions
Subscribe to Blockchain Events
You can subscribe to different blockchain events in real time using subscription endpoints. Use filters to listen for particular contract addresses, account addresses, and/or token IDs.
Subscribing to Events
Sequence Indexer SubscribeEvents Method:
- Request:
POST /rpc/Indexer/SubscribeEvents - Content-Type:
application/json - Body (in JSON):
Filters([]object) -- an array of filterscontractAddresses([]string) -- a ERC20 / ERC721 / ERC1155 contract addressaccounts([]string) -- wallet addressestokenIDs([]int) optional -- an array of token idsevents([]string) -- an array of event namestopicHashes([]string) -- an array of topic hashes
One of contractAddresses, accounts must be provided in the filter.
Subscribing to Balance Updates
Sequence Indexer SubscribeBalanceUpdates Method:
Subscribing to Receipts
Sequence Indexer SubscribeBalanceUpdates Method:
Example SubscribeEvents
cURL
curl -X POST \
-H 'Content-type: application/json' \
-H "X-Access-Key: c3bgcU3LkFR9Bp9jFssLenPAAAAAAAAAA" \
https://polygon-indexer.sequence.app/rpc/Indexer/SubscribeBalanceUpdates \
-d '{"contractAddress":"0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359"}'