Skip to main content
GET
Coin OHLC Chart within Time Range by ID

Notes

  • Find a coin’s API ID on its CoinGecko page, via Coins List, or this Google Sheet.
  • Accepts ISO date strings (YYYY-MM-DD or YYYY-MM-DDTHH:MM, recommended) or UNIX timestamps for from and to.
  • The timestamp in the response indicates the close time of each OHLC candle.
  • Interval options:
    • daily: up to 180 days per request (180 candles)
    • hourly: up to 31 days per request (744 candles)
  • Data available from 9 February 2018 onwards.
  • For better granularity, consider Coin Historical Chart Data.

SDK Examples

Authorizations

x-cg-pro-api-key
string
header
required

Learn how to set up your API key

Path Parameters

id
string
default:bitcoin
required

Coin ID. *refers to /coins/list.

Query Parameters

vs_currency
string
default:usd
required

Target currency of price data. *refers to /simple/supported_vs_currencies.

from
string
default:2025-12-01
required

Starting date in ISO date string (YYYY-MM-DD or YYYY-MM-DDTHH:MM) or UNIX timestamp. Use ISO date string for best compatibility.

to
string
default:2025-12-31
required

Ending date in ISO date string (YYYY-MM-DD or YYYY-MM-DDTHH:MM) or UNIX timestamp. Use ISO date string for best compatibility.

interval
enum<string>
default:daily
required

Data interval.

Available options:
daily,
hourly

Response

200 - application/json

Coin OHLC chart data within time range