api/v2/block - Bitcoin Cash
Example code for the api/v2/block REST method. Complete guide on how to use the api/v2/block REST method in the GetBlock Web3 documentation.
Parameters
Parameter
Type
Location
Required
Description
Request
curl --location --request GET 'https://go.getblock.io/<ACCESS-TOKEN>/api/v2/block/0000000000000000023a561e1ea370153aac5d1504726d1a039032831c05fcfc?page=1'const response = await fetch(
'https://go.getblock.io/<ACCESS-TOKEN>/api/v2/block/0000000000000000023a561e1ea370153aac5d1504726d1a039032831c05fcfc?page=1'
);
console.log(await response.json());import requests
response = requests.get('https://go.getblock.io/<ACCESS-TOKEN>/api/v2/block/0000000000000000023a561e1ea370153aac5d1504726d1a039032831c05fcfc?page=1')
print(response.json())Response
{
"page": 1,
"totalPages": 3,
"itemsOnPage": 1000,
"hash": "0000000000000000023a561e1ea370153aac5d1504726d1a039032831c05fcfc",
"previousBlockHash": "000000000000000001d3a318372df5d1eec54462a0d7471ae1cdf49838f793dd",
"nextBlockHash": "000000000000000000006d8e1eb870bd281b30ed621acf6b8d6af2a3c7ab61f1",
"height": 684634,
"confirmations": 1197,
"size": 1350854,
"time": 1617180599,
"version": 1073733632,
"merkleRoot": "d14c9f467c4bdd5135837696150ab5f52f3f5043de324ca4e5766b195b9f8f37",
"nonce": "3669423616",
"bits": "170cdf6f",
"difficulty": "21865558044610.55",
"txCount": 2815,
"txs": [
{
"txid": "10b54fd708ab2e5703979b4ba27ca0339882abc2062e77fbe51e625203a49642",
"value": "9407625",
"fees": "2938345"
}
]
}Response Parameters
Field
Type
Description
Use Cases
Error Handling
HTTP Status
Message
Description
Was this helpful?