Skip to main content
POST
eth_newBlockFilter
curl --request POST \
  --url https://tempo-moderato.core.chainstack.com/a25a421add2280d53fdbc23417055501/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "method": "eth_newBlockFilter",
  "params": [],
  "id": 1
}
'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": "<string>"
}
Tempo API method that creates a filter for new block notifications. The filter can be polled with eth_getFilterChanges to get new block hashes.
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.
With Tempo’s ~0.5 second block times, this filter will receive frequent updates.

Parameters

  • none

Response

  • result — the filter ID

eth_newBlockFilter code examples

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();

Body

application/json
jsonrpc
string
default:2.0
method
string
default:eth_newBlockFilter
params
any[]
id
integer
default:1

Response

200 - application/json

The filter ID

jsonrpc
string
id
integer
result
string

The filter ID for new block notifications

Last modified on January 23, 2026