Skip to main content

eth_newBlockFilter

POST

Creates a block filter so the client can be notified when a new block arrives, and returns the filter ID.Query the created filter with eth_getFilterChanges, and remove it with eth_uninstallFilter when done.

📘 A filter expires automatically if it is not queried with eth_getFilterChanges for a certain period.

Responses
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "Unauthorized"
}
cURL
curl -X POST 'https://tron-mainnet.nodit.io' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_newBlockFilter",
"params": []
}'