api/v2/balancehistory - Bitcoin Cash
Example code for the api/v2/balancehistory REST method. Complete guide on how to use the api/v2/balancehistory 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/balancehistory/bitcoincash:qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx6a?from=1617100000&to=1617300000&fiatcurrency=usd'const response = await fetch(
'https://go.getblock.io/<ACCESS-TOKEN>/api/v2/balancehistory/bitcoincash:qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx6a?from=1617100000&to=1617300000&fiatcurrency=usd'
);
console.log(await response.json());import requests
response = requests.get('https://go.getblock.io/<ACCESS-TOKEN>/api/v2/balancehistory/bitcoincash:qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx6a?from=1617100000&to=1617300000&fiatcurrency=usd')
print(response.json())Response
[
{
"time": 1617177600,
"txs": 1,
"received": "9407625",
"sent": "0",
"sentToSelf": "0",
"rates": {
"usd": 512.34
}
}
]Response Parameters
Field
Type
Description
Use Cases
Error Handling
HTTP Status
Message
Description
Was this helpful?