getblockheader | Bitcoin

The getblockheader method retrieves detailed information about a block header given its hash. This includes the block's hash, the number of confirmations, its height in the blockchain, version, Merkle root, block time, nonce, difficulty, total work done in the chain up to this block, and the hashes of the previous and next blocks if available.

πŸ‘

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • blockhash (required): The hash of the block header to retrieve.

Response

  • result β€” an object containing detailed information about the block header, such as its hash, confirmations, height, version, Merkle root, time, nonce, difficulty, total work, number of transactions, and previous and next block hashes.
  • error β€” an object containing an error message if an error occurred, otherwise null.
  • id β€” an integer representing the ID of the request.

Use case

The getblockheader method is essential for applications and services that need to verify the blockchain's integrity or analyze its properties. It provides critical information about individual blocks without the need to download the entire block, making it useful for lightweight clients and block explorers.

Try the getblockheader RPC method yourself

Language
Click Try It! to start a request and see the response here!