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

# getbestblockhash

Returns the hash of the best (tip) block in the most-work fully-validated chain.

This method will use `10` [Compute Units](/nodeapi/about/billing).

***

## **Reference:** [**Here**](https://developer.bitcoin.org/reference/rpc/getbestblockhash.html)

## Returns

| Name | Type | Description |
| - | - | - |
| hex | string | the block hash, hex-encoded |

<CodeGroup>
  ```bash title="mainnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
  curl https://mainnet.bitcoin.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
   -X POST \
   -H "Content-Type: application/json" \
   -d '{
  	"jsonrpc": "1.0",
  	"id": "curltest",
  	"method": "getbestblockhash",
  	"params": []
  }'
  ```

  ```bash title="testnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
  curl https://testnet.bitcoin.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
   -X POST \
   -H "Content-Type: application/json" \
   -d '{
  	"jsonrpc": "1.0",
  	"id": "curltest",
  	"method": "getbestblockhash",
  	"params": []
  }'
  ```
</CodeGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.