curl --request POST \
--url https://nd-202-842-353.p2pify.com/788f110831fe13808302bd79796d55e8 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "1.0",
"method": "getblockhash",
"params": [
836491
],
"id": 1
}'
{
"result": "<string>",
"error": {},
"id": 123
}
curl --request POST \
--url https://nd-202-842-353.p2pify.com/788f110831fe13808302bd79796d55e8 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "1.0",
"method": "getblockhash",
"params": [
836491
],
"id": 1
}'
{
"result": "<string>",
"error": {},
"id": 123
}
getblockhash
method returns the hash of the block at the given height in the blockchain.
height
(required) — the height of the block whose hash should be returnedresult
— a string representing the hash of the block at the given heighterror
— an object containing an error message if an error occurred, otherwise null
id
— an integer representing the ID of the request, used to match requests with responsesgetblockhash
method is useful for retrieving the hash of a block at a specific height in the blockchain. This can be used in conjunction with other methods like getblock
to retrieve detailed information about a particular block.
For example, a block explorer application might use getblockhash
to get the hash of the latest block, and then use that hash with getblock
to retrieve and display the contents of the latest block.The hash of the block at the given height
The response is of type object
.
Was this page helpful?