getblockhash
Bitcoin node API
getblockhash | Bitcoin
The getblockhash method returns the hash of the block at the given height in the blockchain. getblockhash on Bitcoin via Chainstack.
POST
getblockhash
TheDocumentation Index
Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
Use this file to discover all available pages before exploring further.
getblockhash method returns the hash of the block at the given height in the blockchain.
Get your own node endpoint todayStart 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
height(required) — the height of the block whose hash should be returned
Response
result— a string representing the hash of the block at the given heighterror— an object containing an error message if an error occurred, otherwisenullid— an integer representing the ID of the request, used to match requests with responses
Use case
Thegetblockhash method is useful for retrieving the hash of a block at a specific height in the blockchain. This can be used in conjunction with other methods like getblock to retrieve detailed information about a particular block.
For example, a block explorer application might use getblockhash to get the hash of the latest block, and then use that hash with getblock to retrieve and display the contents of the latest block.Last modified on May 18, 2026