Charts
Historical price charts supporting OHLC and simple formats across multiple timeframes. Chart endpoints are capped at 30 requests per minute on the Free tier; paid plans use their standard rate limit.
Price history data is sourced from CoinGecko and stored in Bitcompare's database. For live lending, staking, and borrowing rate charts see the Rates endpoints, which are Bitcompare's own aggregated data.
Data resolution
The API automatically selects the best data source for each timeframe. Raw price data is aggregated into hourly and daily OHLC candles for efficient long-range queries.
| Timeframe | Resolution | Data source | History |
|---|---|---|---|
1h | 5 min | Raw data | 30 days |
24h | 1 hour | Hourly candles | 1 year |
7d | 1 hour | Hourly candles | 1 year |
30d | 1 day | Daily candles | 5 years |
90d | 1 day | Daily candles | 5 years |
1y | 1 day | Daily candles | 5 years |
max | 1 day | Daily candles | 5 years |
Responses are capped at 1,000 data points. Larger result sets are automatically downsampled while preserving the first and last data points.
Get chart data
Get historical price chart for a coin. Supports two formats:
ohlc(default) — full OHLC data withdataPointsarray containingopen,high,low,close, andpricefields plus aggregatestats.simple— lightweight[timestamp, price]pairs in apricesarray.
Path parameters
- Name
coinId- Type
- string
- Description
Coin identifier (e.g.,
"bitcoin").
Optional attributes
- Name
timeframe- Type
- string
- Description
Chart timeframe:
1h,24h,7d,30d,90d,1y, ormax. Defaults to24h.
- Name
format- Type
- string
- Description
Output format:
ohlcorsimple. Defaults toohlc.
Request
curl -G https://api.bitcompare.net/api/v1/charts/bitcoin \
-d timeframe=7d \
-d format=ohlc
Response (OHLC format)
{
"data": {
"coinId": "bitcoin",
"timeframe": "7d",
"dataPoints": [
{
"timestamp": "2025-10-22T00:00:00Z",
"price": 44500.00,
"open": 44200.00,
"high": 45100.00,
"low": 44000.00,
"close": 44800.00
}
],
"stats": {
"minPrice": 43800.00,
"maxPrice": 45500.00,
"avgPrice": 44650.00,
"changePct": 2.5,
"totalPoints": 168
}
}
}
Category rate charts
Get historical rate charts for a specific rate category (lending, staking, or borrowing). Supports the same ohlc and simple formats as price charts — see above for format details. Rate charts use rate instead of price and rates instead of prices in the response.
Path parameters
- Name
coinId- Type
- string
- Description
Coin identifier.
- Name
category- Type
- string
- Description
Rate category:
lending,staking, orborrowing.
Optional attributes
- Name
timeframe- Type
- string
- Description
Chart timeframe:
1h,24h,7d,30d,90d,1y, ormax. Defaults to24h.
- Name
format- Type
- string
- Description
Output format:
ohlcorsimple. Defaults toohlc.
Request
curl -G https://api.bitcompare.net/api/v1/charts/bitcoin/rates/lending \
-d timeframe=30d
Response (OHLC format)
{
"data": {
"coinId": "bitcoin",
"category": "lending",
"timeframe": "30d",
"dataPoints": [
{
"timestamp": 1729555200000,
"rate": 5.2,
"open": 5.1,
"high": 5.3,
"low": 5.0,
"close": 5.2
}
],
"stats": {
"minRate": 4.8,
"maxRate": 5.5,
"avgRate": 5.1,
"changePct": 3.2,
"totalPoints": 30
}
}
}
Multi-coin charts
Get chart data for multiple coins in a single request.
Required attributes
- Name
coins- Type
- string
- Description
Comma-separated coin identifiers (e.g.,
"bitcoin,ethereum,cardano").
Optional attributes
- Name
timeframe- Type
- string
- Description
Chart timeframe. Defaults to
24h.
Request
curl -G https://api.bitcompare.net/api/v1/charts \
-d coins=bitcoin,ethereum \
-d timeframe=24h
Response
{
"data": {
"timeframe": "24h",
"charts": {
"bitcoin": {
"coinId": "bitcoin",
"timeframe": "24h",
"dataPoints": [
{
"timestamp": "2025-10-29T00:00:00Z",
"price": 44500.00,
"open": 44200.00,
"high": 45100.00,
"low": 44000.00,
"close": 44800.00
}
],
"stats": {
"minPrice": 44500.00,
"maxPrice": 45500.00,
"avgPrice": 45000.00,
"changePct": 1.2,
"totalPoints": 24
}
},
"ethereum": {
"coinId": "ethereum",
"timeframe": "24h",
"dataPoints": [
{
"timestamp": "2025-10-29T00:00:00Z",
"price": 2450.00,
"open": 2430.00,
"high": 2550.00,
"low": 2420.00,
"close": 2500.00
}
],
"stats": {
"minPrice": 2450.00,
"maxPrice": 2550.00,
"avgPrice": 2500.00,
"changePct": 0.8,
"totalPoints": 24
}
}
}
}
}
Current price
Get the current price for a coin. Cached for 30 seconds.
Path parameters
- Name
coinId- Type
- string
- Description
Coin identifier.
Request
curl https://api.bitcompare.net/api/v1/charts/bitcoin/current
Response
{
"data": {
"coinId": "bitcoin",
"price": 45000.50,
"source": "local_database"
}
}