ankr_getLogs

Retrieves historical data for the specified range of blocks.

Request

This endpoint expects an object.
addressstring or list of stringsOptional
Contract address or a list of addresses from which logs should originate.
blockchainenum or list of enums or nullOptional

Name of the blockchain or list of blockchain names. Single: eth. Multiple: [eth, bsc, fantom, avalanche, polygon, arbitrum, syscoin, optimism, eth_goerli, polygon_mumbai, avalanche_fuji]. All chains: empty value.

decodeLogsbooleanOptional

Decode logs (true) or not (false).

descOrderbooleanOptional

Sorting order. Descending (true) or ascending (false).

fromBlockinteger or stringOptional

Number of the first block in a range. Integer or string (hex value or earliest).

fromTimestampintegerOptional>=0
Beginning of a time period. UNIX timestamp.
pageSizeintegerOptional>=1

Number of entries per page. Max value — 10000, default value — 1000.

pageTokenstringOptional
Current page token for pagination.
toBlockinteger or stringOptional

Number of the last block in a range. Integer or string (hex value or latest).

toTimestampintegerOptional
End of a time period. UNIX timestamp.
topicslist of strings or lists of stringsOptional
An array of DATA topics.

Response

Result returned by ankr_getLogs.

logslist of objects or null
nextPageTokenstringOptional
Next page token for pagination.