Skip to main content

eth_getLogs

POST 

/

Returns an array of all logs matching a given filter object. For details, see eth_newFilter.

Parameters:

  • object: the transaction filter object that contains the following parameters:
  • fromBlock and toBlock: block numbers or the strings 'latest', 'earliest', 'pending'. The maximum allowed block range is 500 and log responses cannot exceed 10 MB or 10,000 logs. If hash is present in the filter criteria, then neither fromBlock nor toBlock are allowed.
  • address: the contract address or a list of addresses which the logs should originate from.
  • topics: an array of data which must be present in the logs.
  • hash: the hash (32 bytes) of the block or the string 'latest', 'earliest', 'pending'.

Returns:

  • result: an array of logs.
note

For "pending" blocks, the API forwards requests to RPC nodes, and returns back to clients the responses received from the RPC nodes.

Example:

"params": [
{
"hash": "0x63392b0dbab8cecbf16a8174f6ee7c2fd58a01d1f9bd5599aa422d0c782908d5",
"address": "0x02790f32ad7e7eaaecfb0ad21950829932f1a2ee"
}
]

Request

Query Parameters

    apikey stringrequired

    Your API key

Body

    id integer
    jsonrpc string
    method string

    params

    object[]

  • Array [

  • hash string
    address string
  • ]

Responses

Successful response

Schema

    jsonrpc string
    id integer
    result object[]
Loading...