Skip to main content
GET
Coin Historical Chart Data 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.
  • Auto-granularity when interval is not specified:
    • 1 day from current time = 5-minutely data
    • 1 day from any other time = hourly data
    • 2–90 days = hourly data
    • Above 90 days = daily data (00:00 UTC)
  • Override with the interval parameter:
    • daily: daily historical data
    • hourly: hourly data, up to any 100 days per request
    • 5m: 5-minutely data, up to any 10 days per request (Enterprise only)
  • Data availability: 5m from 9 Feb 2018, hourly from 30 Jan 2018.
Cache / Update Frequency:
The last completed UTC day (00:00) is available 35 minutes after midnight (00:35 UTC). Cache expires at 00:40 UTC.

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 market data. *refers to /simple/supported_vs_currencies.

from
string
default:2025-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: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>

Data interval, leave empty for auto granularity.

Available options:
5m,
hourly,
daily
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 historical chart data within time range

prices
number[][]
required

Price data points as [timestamp, price] pairs

market_caps
number[][]
required

Market cap data points as [timestamp, market_cap] pairs

total_volumes
number[][]
required

Total volume data points as [timestamp, volume] pairs