> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# eth_getFilterChanges | Arc

> Arc API method that returns an array of logs or block/transaction hashes that occurred since the last poll. Arc via Chainstack.

Arc 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`.

## 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

```javascript ethers.js theme={"system"}
const ethers = require('ethers');
const NODE_URL = "CHAINSTACK_NODE_URL";
const provider = new ethers.JsonRpcProvider(NODE_URL);

// USDC token address
const USDC = "0x3600000000000000000000000000000000000000";
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: USDC,
      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();
```

```python web3.py theme={"system"}
from web3 import Web3
import time

node_url = "CHAINSTACK_NODE_URL"
web3 = Web3(Web3.HTTPProvider(node_url))

# USDC token address
USDC = "0x3600000000000000000000000000000000000000"
TRANSFER_TOPIC = web3.keccak(text="Transfer(address,address,uint256)").to_0x_hex()

# Create a log filter
filter_result = web3.provider.make_request("eth_newFilter", [{
    "address": USDC,
    "topics": [TRANSFER_TOPIC]
}])
filter_id = filter_result['result']
print(f"Created filter: {filter_id}")

# Poll for changes
try:
    for _ in range(10):
        changes_result = web3.provider.make_request("eth_getFilterChanges", [filter_id])
        changes = changes_result['result']

        if changes:
            print(f"\nFound {len(changes)} new Transfer events:")
            for log in changes:
                print(f"  Block {int(log['blockNumber'], 16)}: {log['transactionHash']}")
        else:
            print("No new changes...")

        time.sleep(2)
finally:
    web3.provider.make_request("eth_uninstallFilter", [filter_id])
    print("\nFilter uninstalled")
```

```bash cURL theme={"system"}
# First create a filter
curl -X POST "CHAINSTACK_NODE_URL" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_newFilter",
    "params": [{"address": "0x3600000000000000000000000000000000000000"}],
    "id": 1
  }'

# Then poll for changes using the returned filter ID
curl -X POST "CHAINSTACK_NODE_URL" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_getFilterChanges",
    "params": ["0x1"],
    "id": 1
  }'
```


## OpenAPI

````yaml openapi/arc_node_api/filter_handling/eth_getFilterChanges.json POST /
openapi: 3.0.0
info:
  title: Chainstack Node API
  version: 1.0.0
  description: This is an API for interacting with a Chainstack node.
servers:
  - url: https://arc-mainnet.core.chainstack.com/mt_c524ad9781ae5dccd9ac6f5b0370e
security: []
paths:
  /:
    post:
      tags:
        - upload
      summary: eth_getFilterChanges
      operationId: eth_getFilterChanges
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_getFilterChanges
                params:
                  type: array
                  default:
                    - '0x1'
      responses:
        '200':
          description: Returns the result of eth_getFilterChanges.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: array
                    items:
                      type: string
              example:
                jsonrpc: '2.0'
                id: 1
                result:
                  - >-
                    0x44b950f3f76ba3d21b439bdd88d4700779704690bec89d0ff3d60116ed38bc3e
                  - >-
                    0x1271571f5ad3d25acea02de04308c570c00e23b9d36cadc3a12af8b3d97e0a16

````