eth_getBlockByNumberfull
Retrieves detailed information about a specific block by its number, including comprehensive details for all transactions within that block
Request
Examples
curl --request POST \
--url https://rpc.xone.org \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": [
"finalized",
true
]
}
'
Response
200 OK
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"difficulty": "0x4ea3f27bc",
"extraData": "0x65746865726d696e652d6575312d32",
"gasLimit": "0x47e7c4",
"gasUsed": "0x6384",
"hash": "0x5bad55fbd7e0f20eac95f45f55f997216de10aaf176314c236b0c3c93c5d1f17",
"logsBloom": "0x0",
"miner": "0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5",
"mixHash": "0x75b1f48901cf1d37ad43c2b29eafeb1f3ae5cf5c5d55b1b3be6b2be4a25d6ec6",
"nonce": "0x539bd4979b50162d",
"number": "0x1b4",
"parentHash": "0x8e3d7ea52a14b9d773c37d67e2a4b8e6a12573c3d60a1cd1a58455d3008d1c9d",
"receiptsRoot": "0xbcdfc35b86bedf72e283106f1f9a03c8d99a6de2b1cba6b01ff3e78e924e05c8",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad0d4e8eeb004cfe8dec7d1f3469a7f5f",
"size": "0x220",
"stateRoot": "0x7d00dcd0e0d14e6f7d9dc57116d0e5f76b0abdc716a1d7e6b4df87eae7795b7a",
"timestamp": "0x55ba467c",
"totalDifficulty": "0x78ed983323d",
"transactions": [
{
"blockHash": "0x5bad55fbd7e0f20eac95f45f55f997216de10aaf176314c236b0c3c93c5d1f17",
"blockNumber": "0x1b4",
"from": "0x5cb2045c43d14a5f5e5f1ea60c5b02e0a93032cf",
"gas": "0x7d3c",
"gasPrice": "0xba43b7400",
"hash": "0x1a85165ac88f73b7a290104f614cf08d8b4f3e193f41f209c3716d9c237139f5",
"input": "0x",
"nonce": "0x15",
"to": "0x3535353535353535353535353535353535353535",
"transactionIndex": "0x0",
"value": "0x1bc16d674ec80000",
"v": "0x1c",
"r": "0x5e1d3a76fbf824220e68236e2d51cb98f349a5a6e4f43e3f471f5d0421d4aee2",
"s": "0x5e1d3a76fbf824220e68236e2d51cb98f349a5a6e4f43e3f471f5d0421d4aee2"
}
],
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}
Request params
Name | Type | Description |
---|---|---|
id | integer | Request identifier |
jsonrpc | string | JSON-RPC version |
method | string | API method name |
Parameters | array | |
blockNumber | string | The block number or tag ("latest", "earliest", "pending") at which to get the balance. |
transaction_detail_flag | boolean | Must be true to retrieve full transaction details. |
Response
200
Detailed block object if found, or null if no block is found.Name | Type | Description |
---|---|---|
Parameters | object | |
baseFeePerGas | string | Base fee per gas in hexadecimal. |
difficulty | integer | Block difficulty as an integer (hexadecimal). |
extraData | string | Extra data field of the block. |
gasLimit | string | Maximum gas allowed in the block (hexadecimal string). |
gasUsed | string | Total gas used by all transactions (hexadecimal string). |
hash | string | Block hash (null if pending). |
logsBloom | string | Bloom filter for logs (null if pending). |
miner | string | Address of the mining reward recipient. |
mixHash | string | 256-bit hash as a hexadecimal string. |
nonce | string | Number of prior transactions from the sender. |
number | string | The block number of the requested block encoded as hexadecimal. |
parentHash | string | Parent block hash. |
receiptsRoot | string | Root of the receipts trie. |
sha3Uncles | string | SHA3 hash of uncles data. |
size | string | Block size in bytes. |
stateRoot | string | Root of the final state trie. |
timestamp | string | UNIX timestamp of the block's creation. |
totalDifficulty | string | Total difficulty of the chain up to this block. |
transactions | array | Array of transaction objects, including: |
transactionsRoot | string | The root of the transaction trie of the block |
uncles | array | Array of uncle block hashes |