Polygon
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Polygon
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
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.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | filterId | string | Sí | The filter ID to poll. |
| Tipo | Descripción |
|---|---|
| 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.
| Código | Mensaje | Causa |
|---|---|---|
-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.Parámetros
Hex filter ID from eth_newFilter, eth_newBlockFilter, or eth_newPendingTransactionFilter