Coins

Get historical OHLC

Returns Open/High/Low/Close values with volume and market capitalization for any date range. If the end date is the current day, data can change with every request until actual close of the day at 23:59:59.

Candles are built from our aggregated volume-weighted price rather than one exchange's tape. Before comparing a long range against another source, read the price calculation methodology, in particular its algorithm history, which records the changes that affect how older candles compare with recent ones.

On Business, Ultimate and Enterprise plans each entry also includes circulating_supply: the circulating supply implied by the entry, calculated as market_cap / close in USD (an approximation, not a recorded supply value). The field is omitted on other plans and when market cap or price is missing.

Available on the following API plans:

  • Free
  • Starter
  • Pro
  • Business
  • Ultimate
  • Enterprise

Maximum time range of data available to fetch depending on the plan:

PlanTime range
FreeLast 24 hours
StarterLast 30 days
ProLast 90 days
BusinessLast 365 days
UltimateNo limits
EnterpriseNo limits

The default interval of returned data for OHLCV is 24 hours:

[
  {
    "time_open": "2020-01-01T00:00:00Z",
    "time_close": "2020-01-01T23:59:59Z",
    "open": ...,
    "high": ...,
    "low": ...,
    "close": ...,
    "volume": ...,
    "market_cap": ...
  }
  ...
]

However, depending on your API plan, you can set a smaller interval by using the query parameter interval:

Planinterval parameter value
Free24h
Starter24h
Pro24h
Business1h, 6h, 12h, 24h
Ultimate1h, 6h, 12h, 24h
Enterprise5m, 15m, 30m, 1h, 6h, 12h, 24h

Update interval: Every 5 minute.

get/coins/{coin_id}/ohlcv/historical

Request

Path parameters

coin_idstring required
Example:btc-bitcoin

Query parameters

startstring required

start point for historical data

Supported formats:

  • RFC3999 (ISO-8601) eg. 2018-02-15T05:15:00Z
  • Simple date (yyyy-mm-dd) eg. 2018-02-15
  • Unix timestamp (in seconds) eg. 1518671700
endstring

end point for ohlcv (max 1 year)

Supported formats:

  • RFC3999 (ISO-8601) eg. 2018-02-15T05:15:00Z
  • Simple date (yyyy-mm-dd) eg. 2018-02-15
  • Unix timestamp (in seconds) eg. 1518671700

If not provided calculated by the limit parameter

limitinteger

limit of result rows (max 366)

intervalstring

returned OHLCV point interval (available values: 5m, 15m, 30m, 1h, 6h, 12h, 24h)

quotestring

Quote currency of the returned data: usd or btc, no other values. Other currencies (EUR, PLN and more) exist only for current prices, through quotes on the ticker endpoints and through the price converter.

Response

successful operation

time_openstring

RFC3999 (ISO-8601) format

time_closestring

RFC3999 (ISO-8601) format

opennumber nullable
highnumber nullable
lownumber nullable
closenumber nullable
volumeinteger nullable
market_capinteger nullable
circulating_supplyinteger

Circulating supply implied by the entry (market_cap / close in USD); an approximation, not a recorded supply value. Returned only on Business, Ultimate and Enterprise plans, omitted when market cap or price is missing.

Example response

[
  {
    "time_open": "2018-03-01T00:00:00Z",
    "time_close": "2018-03-01T23:59:59Z",
    "open": 856.012,
    "high": 880.302,
    "low": 851.92,
    "close": 872.2,
    "volume": 1868520000,
    "market_cap": 83808161204,
    "circulating_supply": 96087000
  }
]

Changes

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