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

> Robinhood Chain API polling method used to retrieve updates from a filter. A filter is an object used to track changes to the state of the blockchain.

Robinhood Chain API polling method used to retrieve updates from a filter. A filter is an object used to track changes to the state of the blockchain.

Filters can be created using one of the following methods:

* eth\_newFilter
* eth\_newBlockFilter

After creating a filter using one of the available methods, the resulting filter ID can be used to fetch changes by calling the `eth_getFilterChanges` method.

<Warning>
  **Disclaimer**

  Note that the default interactive example in this page will not work as the filter will be expired.

  To test `eth_getFilterChanges` in this page, first create a new filter using one of the following:

  * eth\_newFilter
  * eth\_newBlockFilter

  Then use the fresh filter ID as the parameter for `eth_getFilterChanges`.
</Warning>

## Parameters

* `string` — the filter ID of the filter for which you want to retrieve the changes

## Response

* `array` — an array that represents the changes that have occurred on the blockchain since the last time the filter was polled:
  * For filters created with `eth_newBlockFilter`:
    * `blockHash` — the hashes of the new blocks since the last time the filter was polled.
  * For filters created with `eth_newFilter`, the following event logs:
    * `address` — the contract address from which the event originated.
    * `topics` — an array of 32-byte data fields containing indexed event parameters.
    * `data` — the non-indexed data that was emitted along with the event.
    * `blocknumber` — the block number in which the event was included. `null` if it is pending.
    * `transactionhash` — the hash of the transaction that triggered the event. `null` if pending.
    * `transactionindex` — the integer index of the transaction within the block's list of transactions. `null` if it is pending.
    * `blockhash` — the hash of the block in which the event was included. `null` if it is pending.
    * `logindex` — the integer identifying the index of the event within the block's list of events. `null` if pending.
    * `removed` — the boolean value indicating if the event was removed from the blockchain due to a chain reorganization. `True` if the log was removed. `False` if it is a valid log.

## `eth_getFilterChanges` code examples

<CodeGroup>
  ```javascript ethers.js theme={"system"}
  const { JsonRpcProvider } = require("ethers");

  const provider = new JsonRpcProvider("CHAINSTACK_NODE_URL");

  async function call() {
    const result = await provider.send("eth_getFilterChanges", ["0x1"]);
    console.log(result);
  }

  call();
  ```

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

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

  result = web3.provider.make_request("eth_getFilterChanges", ["0x1"])
  print(result)
  ```

  ```shell cURL theme={"system"}
  curl -X POST "CHAINSTACK_NODE_URL" \
    -H "Content-Type: application/json" \
    --data '{
      "jsonrpc": "2.0",
      "method": "eth_getFilterChanges",
      "params": ["0x1"],
      "id": 1
    }'
  ```
</CodeGroup>


## OpenAPI

````yaml openapi/robinhood_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://robinhood-mainnet.core.chainstack.com/23cf4479b299ab4835d76c05c468ca6e
security: []
paths:
  /:
    post:
      summary: eth_getFilterChanges
      operationId: eth_getFilterChanges
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_getFilterChanges
                params:
                  type: array
                  items:
                    type: string
                    title: The filter ID
                  default:
                    - '0x1'
                id:
                  type: integer
                  default: 1
      responses:
        '200':
          description: The filter changes.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: array
                    items:
                      type: string

````