REST APITradeMarket Data

GET

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

Query Params

  • base string required
    The base currency symbol (the asset being priced). Must be a BitGo-supported instrument symbol (case-insensitive).
  • quote string required
    The quote currency symbol (the currency in which the price is expressed). Must be a BitGo-supported instrument symbol (case-insensitive).
  • interval string enum required
    The time interval for each price data point.
    minutehourday
  • start string date-time
    Start time for the pricing data range (RFC 3339 format). If not provided, defaults to 1 interval before the current time.
  • end string date-time
    End time for the pricing data range (RFC 3339 format). If not provided, defaults to the current time.
  • nextBatchPrevId string
    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.

Responses

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

Response Body

object

Response containing historical price data with pagination support.
  • data object required
    data object
    • prices map of array required
      A map of currency pair to price data
      prices object
      • <key> array of objects
        value object
        • time string date-time required
          The timestamp marking the start of this interval (RFC 3339 format).
        • open number float required
          The opening price at the start of the interval.
        • high number float required
          The highest price reached during the interval.
        • low number float required
          The lowest price reached during the interval.
        • close number float required
          The closing price at the end of the interval.
        • base_volume number float required
          The total trading volume in the base currency during the interval.
        • quote_volume number float required
          The total trading volume in the quote currency during the interval.
    • nextBatchPrevId string nullable
      Pagination cursor for fetching the next batch of results. Null if there are no more results.
400
Bad request.

Response Body

object

Error response for market data requests.
  • error string required
    Detailed error message.
  • errorName string required
    Error code identifier.