📈 Get Ethereum block by number or tag
Code samples
GET /api/v1/eth/block/{blockNumber}
Returns a specific block by its number (decimal or hex QUANTITY) or by tag (latest, earliest, pending) using eth_getBlockByNumber.
🛠️ Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| blockNumber | path | string | true | Block identifier: decimal height (e.g. 21000000), hex QUANTITY (e.g. 0x1406f40), or one of the tags latest, earliest, pending. |
Example responses
200 Response
{
"number": "0x1234abcd",
"hash": 0,
"parentHash": "string",
"nonce": "string",
"sha3Uncles": "string",
"logsBloom": "string",
"transactionsRoot": "string",
"stateRoot": "string",
"receiptsRoot": "string",
"miner": "string",
"difficulty": "string",
"totalDifficulty": "string",
"extraData": "string",
"size": "string",
"gasLimit": "string",
"gasUsed": "string",
"timestamp": "string",
"baseFeePerGas": "string",
"transactions": [
"string"
],
"uncles": [
"string"
]
}
🔁 Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Ethereum block | EthBlock |
| 500 | Internal Server Error | Could not connect to ETH node | None |