getblockhash

The getblockhash method is part of the Bitcoin JSON-RPC API, which is used to interact with the Bitcoin blockchain. This method is specifically designed to return the hash of a block given its height in the blockchain. The height is a numeric value that represents the position of the block in the blockchain, starting from 0 for the genesis block.


Parameters

type
description
height
This is a required parameter. It is a numeric value that specifies the height index of the block in the blockchain. The height index is used to identify a block uniquely within the blockchain.
Return Object
type
description
result
The method returns the hash of the block corresponding to the provided height. This hash is a unique identifier for the block in the Bitcoin blockchain.
error
If there is an error in processing the request, the method will return an error message detailing the issue.
Request Example
Bitcoin Get Block Hash Request

Share on
Share on FacebookShare on XShare on LinkedIn
Did you find this page useful?