getblockhash | Bitcoin

The getblockhash method returns the hash of the block at the given height in the blockchain.


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.


  • height (required) โ€” the height of the block whose hash should be returned


  • result โ€” a string representing the hash of the block at the given height
  • error โ€” an object containing an error message if an error occurred, otherwise null
  • id โ€” an integer representing the ID of the request, used to match requests with responses

Use case

The getblockhash 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.

Try the getblockhash RPC method yourself

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