bb_getTickers - Bitcoin Cash
Example code for the bb_getTickers JSON-RPC method. Complete guide on how to use the bb_getTickers 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/tickers/?currency=usd'curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "bb_getTickers",
"params": [
{
"currency": "usd"
}
],
"id": "getblock.io"
}'const response = await fetch(
'https://go.getblock.io/<ACCESS-TOKEN>/api/v2/tickers/?currency=usd'
);
console.log(await response.json());import requests
response = requests.get('https://go.getblock.io/<ACCESS-TOKEN>/api/v2/tickers/?currency=usd')
print(response.json())Response
{
"ts": 1617180599,
"rates": {
"usd": 512.34
}
}Response Parameters
Field
Type
Description
Use Cases
Error Handling
Error Code
Message
Description
Was this helpful?