Skip to main content
Loading market data…
GET/api/v1/coins/{base}/historyHobbyist tier+ · 30 req/min

OHLCV history for a single coin, bucketed to the requested interval across all venues.

Cross-venue OHLCV rollup built from `candle_1m` rows. For each bucket we fold (first open, MAX high, MIN low, last close, SUM quote volume, SUM trade count) across every instrument under this base. Use this when you want a single line for the whole asset class; for venue-specific bars use `/api/v1/candles` with an `exchange` filter.

Path parameters

Segments of the URL path, validated server-side.

NameTypeRequiredDefaultDescription
basestringrequired
Base asset code.

Query parameters

All query parameters are optional unless marked required.

NameTypeRequiredDefaultDescription
intervalenumoptional1h
Bucket size.
1m5m15m1h4h1d
hoursnumberoptional24
Trailing window in hours. Max 720 (30 days).
limitnumberoptional500
Row cap. Max 5000.

Response shape

Always wrapped in the standard envelope. Nullable fields are explicitly marked — treat missing numeric data as a real data-source gap, not as an error.

data payloadtypescript
// Wrapped in the standard envelope:
// {
//   data: /* shape below */,
//   meta?: { total?: number; limit?: number; offset?: number; ... }
// }

{
  base: string;
  interval: string;
  hours: number;
  candles: Array<{
    ts: number;
    open: number;
    high: number;
    low: number;
    close: number;
    volumeUsd: number;
    trades: number;
  }>;
}

Example

Copy the curl, replace YOUR_KEY with a real key from your dashboard, and run.

Requestbash
curl -sS "http://localhost:3000/api/v1/coins/BTC/history?interval=1h&hours=24" \
  -H "Authorization: Bearer cg_live_YOUR_KEY"
Responsejson
{
  "data": {
    "base": "BTC",
    "interval": "1h",
    "hours": 24,
    "candles": [
      { "ts": 1744834800000, "open": 62900.1, "high": 63250.0, "low": 62850.0, "close": 63180.5, "volumeUsd": 1250000000, "trades": 48210 }
    ]
  },
  "meta": { "total": 1, "interval": "1h", "hours": 24 }
}

Next

Check the error code reference, or get an API key to try the request against your own account.