curl --request POST \
--url https://nd-202-842-353.p2pify.com/788f110831fe13808302bd79796d55e8 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "1.0",
"method": "getblockheader",
"params": [
"000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",
true
],
"id": 1
}'
{
"result": {},
"error": {},
"id": 123
}
curl --request POST \
--url https://nd-202-842-353.p2pify.com/788f110831fe13808302bd79796d55e8 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "1.0",
"method": "getblockheader",
"params": [
"000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",
true
],
"id": 1
}'
{
"result": {},
"error": {},
"id": 123
}
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.
blockhash
(required): The hash of the block header to retrieve.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.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.Information about the block header
The response is of type object
.
Was this page helpful?