eth_getBlockByNumber

Returns information about a block by its number.

Path parameters

apiKeystringRequired

Request

This endpoint expects an object.
Block number or tagstring or enumRequired

The block number or special tags like ‘latest’, ‘earliest’, or ‘pending’.

Hydrated transactionsbooleanRequired

If true, returns full transaction objects; if false, returns only transaction hashes.

Response

The block object containing various properties of the block.

hashstringformat: "^0x[0-9a-f]{64}$"
parentHashstringformat: "^0x[0-9a-f]{64}$"
sha3Unclesstringformat: "^0x[0-9a-f]{64}$"
minerstringformat: "^0x[0-9a-fA-F]{40}$"
stateRootstringformat: "^0x[0-9a-f]{64}$"
transactionsRootstringformat: "^0x[0-9a-f]{64}$"
receiptsRootstringformat: "^0x[0-9a-f]{64}$"
logsBloomstringformat: "^0x[0-9a-f]{512}$"
numberstringformat: "^0x([1-9a-f]+[0-9a-f]*|0)$"
gasLimitstringformat: "^0x([1-9a-f]+[0-9a-f]*|0)$"
gasUsedstringformat: "^0x([1-9a-f]+[0-9a-f]*|0)$"
timestampstringformat: "^0x([1-9a-f]+[0-9a-f]*|0)$"
extraDatastringformat: "^0x[0-9a-f]*$"
mixHashstringformat: "^0x[0-9a-f]{64}$"
noncestringformat: "^0x[0-9a-f]{16}$"
sizestringformat: "^0x([1-9a-f]+[0-9a-f]*|0)$"
transactionslist of strings or list of objects
uncleslist of strings
difficultystringOptionalformat: "^0x([1-9a-f]+[0-9a-f]*|0)$"
baseFeePerGasstringOptionalformat: "^0x([1-9a-f]+[0-9a-f]*|0)$"
withdrawalsRootstringOptionalformat: "^0x[0-9a-f]{64}$"
blobGasUsedstringOptionalformat: "^0x([1-9a-f]+[0-9a-f]*|0)$"
excessBlobGasstringOptionalformat: "^0x([1-9a-f]+[0-9a-f]*|0)$"
parentBeaconBlockRootstringOptionalformat: "^0x[0-9a-f]{64}$"
withdrawalslist of objectsOptional