eth_getHeaderByHash
Returns the execution header of the given block. Header fields introduced by a fork MUST be omitted for headers that predate that fork. The result is `null` if the block is unknown.
Returns information about a block header by hash.
Parameters (by position)
Block hash string required
Result
Header information null or object
Show Option 1 Not Found (null) null
Not Found (null) nullShow Option 2 Header object object
Header object objectHeader object fields
Header information object
Header object
Show Header information object
Header information objectHeader information fields
-
baseFeePerGas
stringBase fee per gas
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
blobGasUsed
stringBlob gas used
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
blockAccessListHash
stringEIP-7928 block access list hash
Match pattern:
^0x[0-9a-f]{64}$
-
difficulty
stringrequiredDifficulty
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
excessBlobGas
stringExcess blob gas
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
extraData
stringrequiredExtra data
Match pattern:
^0x[0-9a-f]*$
-
gasLimit
stringrequiredGas limit
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
gasUsed
stringrequiredGas used
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
hash
stringrequiredHash
Match pattern:
^0x[0-9a-f]{64}$
-
logsBloom
stringrequiredBloom filter
Match pattern:
^0x[0-9a-f]{512}$
-
miner
stringrequiredCoinbase
Match pattern:
^0x[0-9a-fA-F]{40}$
-
mixHash
stringrequiredMix hash
Match pattern:
^0x[0-9a-f]{64}$
-
nonce
stringrequiredNonce
Match pattern:
^0x[0-9a-f]{16}$
-
number
stringrequiredNumber
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
parentBeaconBlockRoot
stringParent Beacon Block Root
Match pattern:
^0x[0-9a-f]{64}$
-
parentHash
stringrequiredParent block hash
Match pattern:
^0x[0-9a-f]{64}$
-
receiptsRoot
stringrequiredReceipts root
Match pattern:
^0x[0-9a-f]{64}$
-
requestsHash
stringEIP-7685 requests hash
Match pattern:
^0x[0-9a-f]{64}$
-
sha3Uncles
stringrequiredOmmers hash
Match pattern:
^0x[0-9a-f]{64}$
-
slotNumber
stringEIP-7843 slot number
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,15})$
-
stateRoot
stringrequiredState root
Match pattern:
^0x[0-9a-f]{64}$
-
timestamp
stringrequiredTimestamp
Match pattern:
^0x(0|[1-9a-f][0-9a-f]*)$
-
transactionsRoot
stringrequiredTransactions root
Match pattern:
^0x[0-9a-f]{64}$
-
withdrawalsRoot
stringWithdrawals root
Match pattern:
^0x[0-9a-f]{64}$
-
additionalProperties
false
Errors
Error code: 4444
-
code
4444
-
message
Pruned history unavailable
Examples
eth_getHeaderByHash example
Request
{
"params": [
"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"
]
}
Response
{
"baseFeePerGas": "0x7",
"blobGasUsed": "0x0",
"difficulty": "0x66e619a",
"excessBlobGas": "0x0",
"extraData": "0xd583010502846765746885676f312e37856c696e7578",
"gasLimit": "0x47e7c4",
"gasUsed": "0x37993",
"hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",
"logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",
"miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",
"mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",
"nonce": "0x378da40ff335b070",
"number": "0x68b3",
"parentBeaconBlockRoot": "0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685",
"parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",
"receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",
"timestamp": "0x5835c54d",
"transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",
"withdrawalsRoot": "0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f"
}