bb_getBlockHash - Bitcoin Cash
Example code for the bb_getBlockHash JSON-RPC method. Complete guide on how to use the bb_getBlockHash JSON-RPC method in the GetBlock Web3 documentation.
Parameters
Parameter
Type
Required
Description
Request
curl --location --request GET 'https://go.getblock.io/<ACCESS-TOKEN>/api/v2/block-index/684634'curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "bb_getBlockHash",
"params": [
684634
],
"id": "getblock.io"
}'const response = await fetch(
'https://go.getblock.io/<ACCESS-TOKEN>/api/v2/block-index/684634'
);
console.log(await response.json());import requests
response = requests.get('https://go.getblock.io/<ACCESS-TOKEN>/api/v2/block-index/684634')
print(response.json())Response
{
"blockHash": "0000000000000000023a561e1ea370153aac5d1504726d1a039032831c05fcfc"
}Response Parameters
Field
Type
Description
Use Cases
Error Handling
Error Code
Message
Description
Was this helpful?