api/v2/tickers-list - Bitcoin

This endpoint returns the fiat currencies for which the indexer has rate data available at a given timestamp.

Parameters

ParameterTypeLocationRequiredDescription
timestampintegerqueryYesUnix timestamp for the requested currency list
tokenstringqueryNoToken symbol or contract key for token-specific data

Request

bashcurl --location --request GET 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/tickers-list/?timestamp=1617180599'

example.js

javascriptconst response = await fetch(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/tickers-list/?timestamp=1617180599'
);
console.log(await response.json());

example.py

pythonimport requests

response = requests.get('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/tickers-list/?timestamp=1617180599')

print(response.json())

Response

json{
    "ts": 1617180599,
    "available_currencies": [
        "usd",
        "eur",
        "gbp",
        "jpy",
        "btc"
    ]
}

Response Parameters

FieldTypeDescription
tsintegerTimestamp the currency list applies to
available_currenciesarrayCurrency codes with rate data
errorstringError text when no list is available

Use Cases

  • Currency Pickers: Populate a currency selector with supported codes
  • Rate Availability: Check which currencies have data before requesting rates
  • Localization: Offer only currencies the indexer can price
  • Validation: Confirm a requested currency is supported at a timestamp

Error Handling

HTTP StatusMessageDescription
400Bad requestA query parameter has an invalid value
404Not foundNo rate data exists for the requested query
500Internal errorThe indexer failed to read rate data