latestOpenAPI 3.0.32026-08-224982,0272.8 MB

e445c15e5bee

Market Data

Get historical prices

Get a list of historical OHLCV (Open, High, Low, Close, Volume) prices for a currency pair within a specified time range. Using this endpoint requires an access token with the appropriate enterprise ID.

Requires access token scope: crypto_compare

get/api/v1/marketdata/cryptocompare/historical/prices

Query parameters

basestring required

The base currency symbol (the asset being priced). Must be a BitGo-supported instrument symbol (case-insensitive).

quotestring required

The quote currency symbol (the currency in which the price is expressed). Must be a BitGo-supported instrument symbol (case-insensitive).

interval'minute' | 'hour' | 'day' required

The time interval for each price data point.

startstring date-time
Example:2024-12-17T14:00:00.000Z

Start time for the pricing data range (RFC 3339 format). If not provided, defaults to 1 interval before the current time.

endstring date-time
Example:2024-12-17T16:00:00.000Z

End time for the pricing data range (RFC 3339 format). If not provided, defaults to the current time.

nextBatchPrevIdstring
Example:63ff9f4c0c01fcd7162c28fc901ad915

Pagination cursor returned from a previous request. Use this to fetch the next batch of results when there are more than 1,000 data points.

Response

Returns historical-price data points. Also returns a page cursor if there are more than 1,000 results.

Example response

{
  "data": {
    "prices": {
      "BTC-USD": [
        {
          "time": "2024-12-17T15:00:00.000Z",
          "open": 89750.25,
          "high": 90125.5,
          "low": 89500,
          "close": 90050.75,
          "base_volume": 1250.85,
          "quote_volume": 112456780.25
        }
      ]
    },
    "nextBatchPrevId": "a0dbb6aad06d9a37c9882231d8dc32ef"
  }
}