ankr_getBlocks

Retrieves details of the specified range of blocks.

Request

This endpoint expects an object.
blockchainenumRequired
Name of the blockchain.
decodeLogsbooleanOptional

Decode logs (true) or not (false).

decodeTxDatabooleanOptional

Decode transaction data (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). Max range — 30 blocks.

includeLogsbooleanOptional

Include logs (true) or exclude them (false). Logs are stored inside transactions, so includeTxs also has to be true when includeLogs is true.

includeTxsbooleanOptional

Include transactions (true) or exclude them (false). includeTxs has to be true if includeLogs is true.

toBlockinteger or stringOptional

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

Response

Result returned by ankr_getBlocks.

blockslist of objects or nullOptional