Polygon
Prêt à utiliser cela en production ?
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
Polygon
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
eth_getFilterChanges polls an existing filter on Polygon PoS (chain ID 137) and returns only what is new since your previous call — log objects for a log filter, block hashes for a block filter, or transaction hashes for a pending-transaction filter. On Polygon, where MATIC-paid blocks arrive about every two seconds, this is the standard HTTP way to keep up with QuickSwap swaps or stablecoin transfers without re-sending the filter criteria each time. Aim your polling loop at https://polygon.therpc.io/YOUR_API_KEY and each call hands back just the events recorded since the last poll.
eth_newBlockFilter, then call eth_getFilterChanges repeatedly to receive each new Bor block hash as it is produced.| # | Nom | Type | Obligatoire | Description |
|---|---|---|---|---|
| 1 | filterId | string | Oui | The filter ID to poll. |
| Type | Description |
|---|---|
| array | For log filters: array of log objects. For block filters: array of block hash strings. For pending-tx filters: array of transaction hash strings. Empty array if no new events. |
Try it live in the Polygon playground.
| Code | Message | Cause |
|---|---|---|
-32000 | filter not found | Filter ID is invalid, expired (>5 min inactivity), or was already uninstalled. |
filter not found error and recreate the filter, then resume polling.removed field — Polygon can reorg recent Bor blocks before they are checkpointed to Ethereum, and reorged logs come back marked removed: true.Paramètres
Hex filter ID from eth_newFilter, eth_newBlockFilter, or eth_newPendingTransactionFilter