Currencies

Historical OHLCV

Description

Aggregated historical candles for a single coin: OHLC price, traded volume, circulating supply and period-over-period changes.

Note: All values are in USD; the convert parameter does not apply.

Note: Depth depends on the plan: Advanced — up to 30d at 1h, up to 2y at 1d/1w/1m; Pro — up to 90d at 1h, up to 5y at 1d/1w/1m; Business — up to 1y at 1h, full history at 1d/1w/1m. A from/to range reaching deeper than your plan allows returns 403 PLAN_LIMIT_EXCEEDED — the window is never silently cut.

Tip: For a lightweight price line use /currencies/{id}/sparkline instead.

Access

  • Available from: Advanced
  • Cost: 1 credit per request
get/v3/currencies/{id}/ohlcv

Request

  • Base URL: https://api.cryptorank.io
  • URL: https://api.cryptorank.io/v3/currencies/{id}/ohlcv
  • Auth: API key in header X-Api-Key

Path parameters

idinteger required
Example:1

Coin ID. See: GET /v3/currencies/map.

Query parameters

pagenumber

Page number (1-based). Returns up to 500 items per page.

fromstring

Window start, aligned down to the candle's period. Defaults to the earliest point your plan allows. Accepted: ISO 8601, bare date (YYYY-MM-DD), or Unix timestamp in seconds/milliseconds.

tostring

Window end. Defaults to now. Accepted: ISO 8601, bare date (YYYY-MM-DD), or Unix timestamp in seconds/milliseconds. Bare dates resolve to end-of-day UTC.

interval'1h' | '1d' | '1w' | '1m'

Candle granularity: hour, day, week, or month. Depth allowed per granularity depends on your plan.

sortOrder'asc' | 'desc'

Sort direction by candle time.

Response

Example response

{
  "data": [
    {
      "avg": "64700.25",
      "circulatingSupply": "19700000",
      "circulatingSupplyChangePercent": 0.11,
      "close": "65000.5",
      "high": "65900.4",
      "low": "63800.01",
      "open": "64100.12",
      "priceChangePercent": 1.4,
      "time": 1715000000000,
      "volume": "28000000000",
      "volumeChangePercent": -8.32
    }
  ],
  "meta": {
    "hasNextPage": true,
    "page": 1,
    "pageSize": 25
  },
  "status": {
    "timestamp": 1780000000000,
    "usedCredits": 1
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.