Skip to main content

eth_newFilter RPC Method

Creates a filter object, based on filter options, to notify when the state changes (logs). To check if the state has changed, call eth_getFilterChanges.

Updated on
Dec 29, 2023

eth_newFilter RPC Method

Please be aware that the block range limit for this RPC method is 5 blocks for users on free Discover plans and 10,000 blocks for those on paid plans. Consider dividing your queries into smaller segments to enhance response times and manage errors more effectively. For further details on the block range limit and strategies for mitigating it, please consult the FAQ

Parameters

object
The transaction response object which contains the following filter information:

Returns

result
It returns a filter id to be used when calling eth_getFilterChanges
Request
1
curl https://docs-demo.xdai.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{"jsonrpc":"2.0","method":"eth_newFilter","params":[{"fromBlock": "0xe20360", "toBlock": "0xe20411", "address": "0x6b175474e89094c44da98b954eedeac495271d0f","topics": []}],"id":1}'
5
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free