dcr

Decred (DCR)

Method: POST getblockhash

dropdown
POST

getblockhash

Returns hash of the block in best block chain at the given height.

Parameters

block height - numeric

height of the block.

Request

curl --location --request POST 'https://dcr.getblock.io/mainnet/' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "getblockhash",
"params": [589761],
"id": "getblock.io"}'


Response

{
    "error": null,
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "000000000000000015cf0d0da939e61d0cd7a37443a99c726ecc9cbbd61b047f"
}