CoinMarketCap historical OHLCV

GET https://api.api.sh/coinmarketcap/v1/historical
1 credit / call finance & crypto try it in the playground →

Daily or hourly OHLCV of a coin between two dates: open, high, low, close, volume, market cap and circulating supply, with the times of the period's high and low, converted to the chosen currency. Daily spans up to 400 days per call, hourly up to 31 days (default: the last 30 days, or 2 days hourly).

Every response includes credits_used: the credits this call cost.

Parameters

nametypedescription
slug string Coin slug, e.g. bitcoin (or pass id or url). Example: bitcoin
id string CoinMarketCap id, e.g. 1.
url string A coinmarketcap.com/currencies/<slug>/ link.
start string Start date (ISO or unix seconds). Example: 2024-01-01
end string End date (ISO or unix seconds; default now). Example: 2024-03-01
interval 1d | 1h 1d (default) or 1h.
convert string Currency (default USD): USD, EUR, GBP, JPY, INR, CNY, KRW, AUD, CAD, CHF, BRL, RUB, TRY, HKD, SGD, IDR, MXN, ZAR, SEK, NOK, PLN, NGN, AED, SAR, VND, BTC, ETH, BNB, SOL, SATS.

Every endpoint also takes fresh, raw, fields (see lean responses and caching).

Example

curl "https://api.api.sh/coinmarketcap/v1/historical?slug=bitcoin" \
  -H "x-api-key: $APISH_KEY"

Response

A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).

The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.