GET
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
Query Params
-
basestring requiredThe base currency symbol (the asset being priced). Must be a BitGo-supported instrument symbol (case-insensitive). -
quotestring requiredThe quote currency symbol (the currency in which the price is expressed). Must be a BitGo-supported instrument symbol (case-insensitive). -
intervalstring enum requiredThe time interval for each price data point.minutehourday -
startstring date-timeStart time for the pricing data range (RFC 3339 format). If not provided, defaults to 1 interval before the current time. -
endstring date-timeEnd time for the pricing data range (RFC 3339 format). If not provided, defaults to the current time. -
nextBatchPrevIdstringPagination 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.
-
dataobject requireddata object
-
pricesmap of array requiredA map of currency pair to price dataprices object
-
<key>array of objectsvalue object
-
timestring date-time requiredThe timestamp marking the start of this interval (RFC 3339 format). -
opennumber float requiredThe opening price at the start of the interval. -
highnumber float requiredThe highest price reached during the interval. -
lownumber float requiredThe lowest price reached during the interval. -
closenumber float requiredThe closing price at the end of the interval. -
base_volumenumber float requiredThe total trading volume in the base currency during the interval. -
quote_volumenumber float requiredThe total trading volume in the quote currency during the interval.
-
-
-
nextBatchPrevIdstring nullablePagination 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.
-
errorstring requiredDetailed error message. -
errorNamestring requiredError code identifier.