Polygon
Bereit, das in der Produktion aufzurufen?
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
Polygon
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
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.| # | Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|---|
| 1 | filterId | string | Ja | The filter ID to poll. |
| Typ | Beschreibung |
|---|---|
| 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 | Meldung | Ursache |
|---|---|---|
-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.Parameter
Hex filter ID from eth_newFilter, eth_newBlockFilter, or eth_newPendingTransactionFilter