Polygon
Polygon
Polygon
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
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.| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | filterId | string | 是 | The filter ID to poll. |
| 类型 | 描述 |
|---|---|
| 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.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-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.参数
Hex filter ID from eth_newFilter, eth_newBlockFilter, or eth_newPendingTransactionFilter