v1
latestOpenAPI 3.1.02026-07-243035381.4 MBGet OHLCV by Symbol
/v4/data/rate/symbol/OHLCV
50 credits per API call
Get historical exchange rate in USD for a symbol at a specific point in time.
This endpoint retrieves the closest available price record for a given symbol and timestamp. The data includes OHLCV (Open, High, Low, Close, Volume). By default returns 1-minute candles; use the interval parameter to aggregate into 5m, 15m, 1h, 1d, etc.
Supported symbols: We support 439+ trading pairs. The symbol parameter accepts the base currency (e.g., "BTC", "ETH").
Time handling:
- If you provide a time, we return the OHLCV record where the time falls within its interval (openTime ≤ time < closeTime), or the closest available record if no exact match is found.
- If you provide a time that is later than any available data, we return the most recent OHLCV record we have.
- If you provide a time that is earlier than any available data, we return the earliest available OHLCV record.
Time format: You can provide time either as a Unix timestamp in milliseconds (using the unix parameter) or as a Date object (using the time parameter). You must provide exactly one of these parameters.
Interval: Candle interval. Supported values: 1m, 5m, 15m, 30m, 45m, 1h, 2h, 4h, 1d, 1w, 1M. Defaults to 1m.
Query parameters
Enum for trading pair symbols used in historical prices. These are the base symbols that are supported for historical price queries.
The base symbol of the trading pair (e.g., "BTC", "ETH").
Unix timestamp in milliseconds. Either <code>unix</code> or <code>time</code> must be provided, but not both.
Date object in ISO 8601 format. Either <code>unix</code> or <code>time</code> must be provided, but not both.
Candle interval. Supported values: 1m, 5m, 15m, 30m, 45m, 1h, 2h, 4h, 1d, 1w, 1M. Defaults to 1m.
Response
OK - Returns the closest available historical price record for the requested symbol and time.
Example response
{
"symbol": "BTC",
"openTime": 1499040000000,
"open": "0.01634790",
"high": "0.80000000",
"low": "0.01575800",
"close": "0.01577100",
"closeTime": 1499644799999,
"volume": "148976.11427815",
"quoteAssetVolume": "2434.19055334",
"numberOfTrades": 308,
"takerBuyBaseAssetVolume": "1756.87402397",
"takerBuyQuoteAssetVolume": "28.46694368"
}