Skip to main content
GET
Coin OHLC Chart by ID

Notes

  • Find a coin’s API ID on its CoinGecko page, via Coins List, or this Google Sheet.
  • The timestamp in the response indicates the close time of each OHLC candle.
  • Auto-granularity (candle body):
    • 1–2 days: 30 minutes
    • 3–30 days: 4 hours
    • 31 days and beyond: 4 days
  • For better granularity, consider Coin Historical Chart Data.
The last completed UTC day (00:00) is available 35 minutes after midnight (00:35 UTC).
Historical data via the Demo API is restricted to the past 365 days. Subscribe to a paid plan for the full range.

SDK Examples

Authorizations

x-cg-demo-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.

days
enum<string>
default:1
required

Data up to number of days ago.

Available options:
1,
7,
14,
30,
90,
180,
365
precision
enum<string>

Decimal place for currency price value.

Available options:
full,
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18

Response

200 - application/json

Coin OHLC chart data