New Here? Claim Your 30% Discount on Your First Blockchain Node Access!

banner image

Last updated on January 1, 1970

1 min read

Method blockhashbyheight undefined ()
connect with REST protocol

blockhashbyheight

info-circle-fill

Given a height: returns hash of block in best-block-chain at height provided.

bch:blockhashbyheight [GET]

Given a height: returns hash of block in best-block-chain at height provided.

Example

GET /rest/blockhashbyheight/<HEIGHT>.<bin|hex|json>

Request

curl --location --request GET 'https://btc.getblock.io/rest/blockhashbyheight/10.json' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json'

Response

{
    "blockhash":"000000002c05cc2e78923c34df87fd108b22221ac6076c18f3ade378a4d915e9"
}
banner icon

Start Building with GetBlock RPCs for Free