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

> Arc API method that creates a filter for new block notifications. The filter can be polled with eth_getFilterChanges to get new block hashes.

Arc API method that creates a filter for new block notifications. The filter can be polled with `eth_getFilterChanges` to get new block hashes.

With Arc's \~0.5 second block times, this filter will receive frequent updates.

## Parameters

* `none`

## Response

* `result` — the filter ID

## `eth_newBlockFilter` code examples

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

  const createBlockFilter = async () => {
      const filterId = await provider.send("eth_newBlockFilter", []);
      console.log(`Filter ID: ${filterId}`);

      // Poll for new blocks
      const newBlocks = await provider.send("eth_getFilterChanges", [filterId]);
      console.log(`New block hashes: ${newBlocks}`);
    };

  createBlockFilter();
  ```

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

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

  block_filter = web3.eth.filter('latest')
  print(f"Filter ID: {block_filter.filter_id}")

  # Poll for new blocks
  new_blocks = block_filter.get_new_entries()
  print(f"New blocks: {new_blocks}")
  ```

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


## OpenAPI

````yaml openapi/arc_node_api/filter_handling/eth_newBlockFilter.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-testnet.core.chainstack.com/6caa7fd90475ac9214f7521dd460fa7c
security: []
paths:
  /:
    post:
      tags:
        - upload
      summary: eth_newBlockFilter
      operationId: eth_newBlockFilter
      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_newBlockFilter
                params:
                  type: array
                  default: []
      responses:
        '200':
          description: Returns the result of eth_newBlockFilter.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: string
              example:
                jsonrpc: '2.0'
                id: 1
                result: '0xaf4e2ce6545218e117cdf055f688d1a7'

````