arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

Get block hash

Retrieves a Bitcoin block hash for a given block height.

This method will use 10 Compute Units.


hashtag
Reference: Herearrow-up-right

GET /api/v2/block-index/<block height>

hashtag
Parameters

block height- string, required.

Example: 785365

hashtag
Returns

curl https://mainnet.bitcoin.validationcloud.io/v1/<YOUR_API_KEY_HERE>/api/v2/block-index/785365 \
 -X GET \
 -H "Content-Type: application/json"
curl https://testnet.bitcoin.validationcloud.io/v1/<YOUR_API_KEY_HERE>/api/v2/block-index/785365 \
 -X GET \
 -H "Content-Type: application/json"
{
  "blockHash": "00000000000000000004a49543c0b6e2043e67b513c0d9100fbdf91f662c3ad1"
}