> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.chainstack.com/feedback

```json
{
  "path": "/reference/bitcoin-getblockhash",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# getblockhash | Bitcoin

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

<Check>
  **Get your own node endpoint today**

  [Start for free](https://console.chainstack.com/) and get your app to production levels immediately. No credit card required.

  You can sign up with your GitHub, X, Google, or Microsoft account.
</Check>

## 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 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.


## OpenAPI

````yaml /openapi/bitcoin_node_api/getblockhash.json POST /788f110831fe13808302bd79796d55e8
openapi: 3.0.0
info:
  title: getblockhash example
  version: 1.0.0
  description: >-
    This is an API example for getblockhash, a method to retrieve the hash of
    the block at a given height.
servers:
  - url: https://nd-202-842-353.p2pify.com
security: []
paths:
  /788f110831fe13808302bd79796d55e8:
    post:
      tags:
        - Blockchain Operations
      summary: getblockhash
      operationId: getBlockHash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  default: '1.0'
                method:
                  type: string
                  default: getblockhash
                params:
                  type: array
                  items:
                    type: integer
                    description: The block height
                    example: 836491
                  default:
                    - 836491
                id:
                  type: integer
                  default: 1
      responses:
        '200':
          description: The hash of the block at the given height
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    description: The block hash
                  error:
                    type: object
                  id:
                    type: integer

````