Ethereum
Bereit, das in der Produktion aufzurufen?
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
Ethereum
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
eth_getFilterChanges is the polling half of Ethereum's filter API. You create a filter once — with eth_newFilter, eth_newBlockFilter, or eth_newPendingTransactionFilter — and then call this method repeatedly to drain only what's new since your last poll. The node remembers a cursor per filter, so each call hands back the delta and advances it. What comes back depends on the filter: a log filter yields log objects, a block filter yields fresh block hashes, a pending-tx filter yields transaction hashes from the mempool. On mainnet (chain ID 1, fees paid in ETH) a sensible poll cadence tracks the 12-second slot. The endpoint is https://ethereum.therpc.io/YOUR_API_KEY; for a true push stream over WebSocket, eth_subscribe is the alternative.
eth_newBlockFilter once, then poll here to collect each new head hash as validators seal slots, useful for cron-style work that should fire once per block.| # | 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 Ethereum playground.
| Code | Meldung | Ursache |
|---|---|---|
-32000 | filter not found | Filter ID is invalid, expired (>5 min inactivity), or was already uninstalled. |
filter not found error (-32000); catch it, recreate the filter, and replay from your last known block.removed flag on each entry. A short single-block reorg at the chain head can re-deliver a log with removed: true, and money-handling code must undo whatever it did for the original.Parameter
Hex filter ID from eth_newFilter, eth_newBlockFilter, or eth_newPendingTransactionFilter