getblockheader

Input(s) 2

Used for quickly accessing block metadata like its position and status in the blockchain, useful for applications needing to verify block connections or sync data efficiently. It optimizes resource use by avoiding the download of full block contents.

How is this used?

You're researching the history of a long and ancient wall, wanting to understand the sequence of its construction and the current status of each segment without examining every brick in detail. The 'getblockheader' command in Bitcoin offers a similar approach to examining the blockchain. By providing the hash of a specific block, you can retrieve crucial metadata about that block—such as its position in the blockchain (height), the time it was mined, and its relationship to other blocks (previous and next blocks)—without needing to download and inspect the entire block's contents, which include all transactions.

Request

method

getblockheader

blockhash

Required

verbose

Optional

Inputs(2)

one required input remaining...

blockhash (required) - The hash of the block
verbose default=true. It's true for a JSON object and false for the hex-encoded data

Result