GET /api/data-api/v3.1/cryptocurrency/historical

Auth X-Hub-Key from API_HUB_KEYExecute GET /run/cmc/api/data-api/v3.1/cryptocurrency/historicalCache cached 1s, never served stale past that windowCost per_call · weight 1 · standard rate classSource billing free

v3.1 OHLC history under quotes[].quote. The requested time window is not the window returned.

name=crypto_historical_v31. timeStart/timeEnd/interval=1d still returned 399 daily bars (2025-09-11 through 2026-10-14) for a ~30-day request. Payload timeEnd 1757548799 matched neither argument. open/high/low/close on quote were populated.

Parameters

nameintypedescription
idquerystrrequiredRoute-specific id. Coin routes use 1 for BTC; exchange reserves use 270 for Binance.
example: 1
convertIdquerystrrequiredQuote convert id. 2781 is USD on these public routes.
example: 2781
timeStartquerystrrequiredRequired, but a ~30-day window was not what came back.
example: 1789508945
timeEndquerystrrequiredRequired, but payload timeEnd matched neither argument.
example: 1792100945
intervalquerystrrequiredBucket size. Accepted tokens differ by route; use this route's verified example.
example: 1d

Response

type: object
data key: quotes
pagination: none

Safe request

Reads the credential from API_HUB_KEY; it never appears in the URL.

curl -sH "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/run/cmc/api/data-api/v3.1/cryptocurrency/historical?id=1&convertId=2781&timeStart=1789508945&timeEnd=1792100945&interval=1d"