POSTeth_newFilter

Creates a filter for logs matching the specified criteria and returns a filter ID. The filter ID is used with eth_getFilterLogs and eth_uninstallFilter.

Request Body
idintegerrequired
jsonrpcstringrequired
methodstringrequired
fromBlockstring

Use one of block number or block tag to specify a block.

  • Block number: hex string (ex. "0x1")
  • Block tag: enum string (ex. "latest", "earliest", "pending")

Block number represents the order of blocks in the chain. It is expressed as a hexadecimal string.

toBlockstring

Use one of block number or block tag to specify a block.

  • Block number: hex string (ex. "0x1")
  • Block tag: enum string (ex. "latest", "earliest", "pending")

Block number represents the order of blocks in the chain. It is expressed as a hexadecimal string.

addressstring[]

Addresses to filter by, as an array.

topicsstring[]

Topics array for filtering transaction logs. Each topic is a 32-byte hex string.

Responses

응답 본문이 없습니다.

X-API-KEY
RequestCU18
cURL
curl -X POST "https://ethereum-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": "latest"
    }
  ]
}'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x0100000000000000ee32c7a8d24aac1f"
}