Register and show off your project at Ethereum QuickPitch and win $10,000. Apply now

Contents

eth_newFilter RPC method

The API credit value for this method is 2 . To learn more about API credits and each method's value, visit the API Credits page.

Parameters:

  1. Object - Should contain filter information, all keys are optional:

    fromBlock - (Optional) Integer block number encoded as a hexadecimal, "latest","pending", or "earliest" tags.

    toBlock - (Optional) Integer block number encoded as a hexadecimal, "latest","pending", or "earliest" tags.

    address - (Optional) Contract address or a list of addresses from which logs should originate.

    topics - (Optional) Array of DATA topics. Topics are order-dependent. Go here to learn more about topics.

Returns:

  1. Result - A filter id - to be used when calling eth_getFilterChanges.

Code Examples:

curl http://sample-endpoint-name.network.quiknode.pro/token-goes-here/ \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"eth_newFilter","params":[{"fromBlock": "0xe20360", "toBlock": "0xe20411", "address": "0x6b175474e89094c44da98b954eedeac495271d0f","topics": []}],"id":1}'
Ready to get started? Create a free account