Get the price candlestick history (open, high, low, close) and trading volume of a futures trading pair on an exchange. Useful for charting price trends, technical analysis, or aligning by time with data such as open interest and funding rates.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Available on all API plans: Hobbyist Startup Standard Professional Enterprise
The candlestick intervals you can query differ by plan; see API Plans and Available Intervals below on this page.
Response Data
data is an array; each element is one candle, and time is the start time of the interval. Prices and trading volume are returned as strings; convert them to numbers before calculating.
200 · application/json · See the response example in the right panel.
| Field | Type | Always Returned | Description |
|---|---|---|---|
code | string | Yes | Business status code; "0" means success |
msg | string | No | Result message; contains the error message when an error occurs |
data | array of object | Yes | Array of candles; each element is one candle |
data[].time | integer (int64) | Yes | Interval start time, timestamp in milliseconds (UTC) |
data[].open | string | Yes | Open price, in the trading pair's quote asset (e.g., USDT for BTCUSDT) |
data[].high | string | Yes | Highest price within the interval |
data[].low | string | Yes | Lowest price within the interval |
data[].close | string | Yes | Close price; the latest price for an interval that has not yet closed |
data[].volume_usd | string | Yes | Trading volume within the interval, in USD |
API Plans and Available Intervals
All API plans can call this endpoint; the difference is which candlestick intervals they can query: the lower the plan, the longer the shortest interval available. For the price of each plan, see API Plans.
| API Plan | Access | Available Candlestick Intervals (interval Parameter) |
|---|---|---|
| Hobbyist | ✅ Yes | 4 hours and above: 4h, 6h, 8h, 12h, 1d, 1w |
| Startup | ✅ Yes | 30 minutes and above: 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 1w |
| Standard | ✅ Yes | All intervals, down to 1 minute (1m) |
| Professional | ✅ Yes | All intervals, down to 1 minute (1m) |
| Enterprise | ✅ Yes | All intervals, down to 1 minute (1m) |
For how far back each interval's history can be queried, see Intervals.
Use This Endpoint with AI
Pick a task and click Open in ChatGPT or Open in Claude: the AI reads this page first and then gives you the result. You can also click Copy and paste the full prompt into the AI tool you use.
Want AI to query real-time data without writing code? Connect CoinGlass MCP in Claude or Cursor and ask in plain language, for example: “What were the highest and lowest prices of the BTCUSDT perpetual contract on Binance over the last 24 hours?”
Use Cases
| Scenario | Description |
|---|---|
| Price Trend Charts | Get candles for a futures trading pair on any exchange and chart its price trend and trading volume. |
| Technical Analysis and Backtesting | Use open, high, low and close data to calculate indicators such as moving averages and volatility, and backtest trading strategies. |
| Align with Derivatives Data | Align with Open Interest OHLC History and Funding Rate OHLC History by time to analyze how price relates to open interest and funding rates. |
| Compare Prices Across Exchanges | Get candles for the same coin on different exchanges and compare the price differences. |
Related Endpoints
| Endpoint | How It Differs |
|---|---|
| Open Interest OHLC History | Open interest candles for the same trading pair |
| Funding Rate OHLC History | Funding rate candles for the same trading pair |
| Supported Exchanges and Pairs | Look up valid values for exchange and symbol |
| Spot Pair Price OHLC History | Price candles for spot trading pairs |
FAQ
What should I pass as symbol?
A trading pair, not a coin; for example, the BTC perpetual contract is BTCUSDT on Binance and BTC-USDT-SWAP on OKX. If the trading pair is wrong, the response has code "400" and a message saying that the trading pair does not exist on that exchange; go by what the Supported Exchanges and Pairs endpoint returns.
I passed start_time and end_time, so why does the number of records differ from limit?
When both start and end times are provided, the number of records returned is determined by the time range. For example, with interval=1h and limit=2, a time range covering 3 hours returned 3 candles.
Why do the values of the last candle keep changing?
The last candle corresponds to an interval that has not yet closed; close is the current latest price.
What happens if the time range is wrong?
end_time must be greater than start_time; otherwise the response has code "400", and msg also gives the earliest start_time your account is allowed, e.g., “Invalid time range: the earliest allowed start_time is 1730263925000, and end_time must be greater than start_time.”
Learn More: Futures Candlesticks (OHLC)
What Is OHLC?
OHLC stands for the Open, High, Low and Close prices within an interval; it is the basic data for drawing candlestick charts and calculating technical indicators.
How Do Futures Prices Differ from Spot Prices?
Futures prices are affected by leveraged capital and funding rates and can be higher or lower than spot prices; the difference between the two is called the basis. Spot candles can be obtained from Spot Pair Price OHLC History.
How Much History Is Available for Each Interval?
The shortest interval you can query depends on your API plan; for the history length of each interval, see Intervals.
