Skip to main content

chain_getHeader RPC Method

Retrieves the header for a specific block.

Updated on
Oct 4, 2023

chain_getHeader RPC Method

Parameters

BlockHash
string
The hash of the block for which you want to retrieve the header information. If not provided, the request will return the header of the latest block on the chain

Returns

result
object
An object representing the header information of the requested block:
parentHash
string
The hash of the parent block, which is the previous block in the chain
number
string
The block number or height in the blockchain sequence
stateRoot
string
The root hash of the state trie after applying the block's transactions
extrinsicsRoot
string
The root hash of the trie containing the extrinsics (transactions) in the block
digest
array
An array containing additional data attached to the block, such as logs
logs
string
The logs associated with the block's digest
Request
1
curl https://docs-demo.dot-mainnet.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{"method":"chain_getHeader","params":[],"id":1,"jsonrpc":"2.0"}'
5
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free