Skip to main content
GET
/
coins
/
{id}
/
ohlc
/
range
💼 Coin OHLC Chart within Time Range by ID
curl --request GET \
  --url https://pro-api.coingecko.com/api/v3/coins/{id}/ohlc/range \
  --header 'x-cg-pro-api-key: <api-key>'
[
  [
    1709395200000,
    61942,
    62211,
    61721,
    61845
  ],
  [
    1709409600000,
    61828,
    62139,
    61726,
    62139
  ],
  [
    1709424000000,
    62171,
    62210,
    61821,
    62068
  ]
]

Authorizations

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

Path Parameters

id
string
default:bitcoin
required

coin ID *refers to /coins/list.

Example:

"bitcoin"

Query Parameters

vs_currency
string
default:usd
required

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

Example:

"usd"

from
string
default:2024-01-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:2024-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>
required

data interval

Available options:
daily,
hourly

Response

200 - application/json

Get coin's OHLC within time range

Example:
[
[1709395200000, 61942, 62211, 61721, 61845],
[1709409600000, 61828, 62139, 61726, 62139],
[1709424000000, 62171, 62210, 61821, 62068]
]