Skip to main content
POST
eth_getFilterChanges
curl --request POST \
  --url https://tempo-moderato.core.chainstack.com/a25a421add2280d53fdbc23417055501/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": [
    "0x..."
  ],
  "id": 1
}
'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": [
    "<unknown>"
  ]
}
Tempo API method that returns an array of logs or block/transaction hashes that occurred since the last poll. Used with filters created by eth_newFilter, eth_newBlockFilter, or eth_newPendingTransactionFilter.
Get you own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • filterId — the filter ID returned from a filter creation method

Response

  • result — array of changes since last poll:
    • For log filters: array of log objects
    • For block filters: array of block hashes
    • For pending transaction filters: array of transaction hashes

eth_getFilterChanges code examples

const ethers = require('ethers');
const NODE_URL = "CHAINSTACK_NODE_URL";
const provider = new ethers.JsonRpcProvider(NODE_URL);

// pathUSD token address
const PATHUSD = "0x20c0000000000000000000000000000000000000";
const TRANSFER_TOPIC = ethers.id("Transfer(address,address,uint256)");

const pollFilter = async () => {
    // Create a log filter for Transfer events
    const filterId = await provider.send("eth_newFilter", [{
      address: PATHUSD,
      topics: [TRANSFER_TOPIC]
    }]);
    console.log(`Created filter: ${filterId}`);

    // Poll for changes every 2 seconds
    const interval = setInterval(async () => {
      const changes = await provider.send("eth_getFilterChanges", [filterId]);

      if (changes.length > 0) {
        console.log(`\nFound ${changes.length} new Transfer events:`);
        for (const log of changes) {
          console.log(`  Block ${parseInt(log.blockNumber, 16)}: ${log.transactionHash}`);
        }
      } else {
        console.log("No new changes...");
      }
    }, 2000);

    // Stop after 20 seconds
    setTimeout(async () => {
      clearInterval(interval);
      await provider.send("eth_uninstallFilter", [filterId]);
      console.log("\nFilter uninstalled");
    }, 20000);
  };

pollFilter();

Body

application/json
jsonrpc
string
default:2.0
method
string
default:eth_getFilterChanges
params
any[]

Filter ID

id
integer
default:1

Response

200 - application/json

Filter changes

jsonrpc
string
id
integer
result
any[]

Array of log objects or block hashes depending on filter type

Last modified on January 23, 2026