Skip to main content

getblockhash

POST

Returns the hash of the block at the given height in the best block chain.
param[0]
heightintegerrequired
The height of the block to look up.
Responses
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "Unauthorized"
}
cURL
curl -X POST 'https://bitcoin-mainnet.nodit.io' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getblockhash",
"params": [
820000
]
}'