Get the order book depth history of a futures trading pair on an exchange: how many bid and ask orders there are within a specified price range (±range%), as a USD amount and as a number of coins. Useful for watching changes in support, resistance and liquidity.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Available on all API plans: Hobbyist Startup Standard Professional Enterprise
The shortest interval you can use differs by API plan; see API Plans and Available Intervals below on this page.
Response Data
data is an array; each element holds the order book statistics for one point in time: how many bid and ask orders there are within the price range specified by range. time is the start time of the interval (in milliseconds); the data is an order book snapshot taken at that moment, not a cumulative or average value over the interval.
Bids Are Buy Orders, Asks Are Sell OrdersFields whose names contain
bidsare bid-side (buy) orders, and fields whose names containasksare ask-side (sell) orders. The “long” and “short” in the example comments also refer to bid and ask orders; these are orders resting on the order book, not long or short positions.
rangeIs in %
range=1means within 1% above and below the price, not 100%. Using differentrangevalues lets you compare how thick the orders are near the price and farther away, but not every value has data; rely on what is actually returned.
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 |
data | array of object | Yes | Array of order book depth data, sorted from oldest to newest |
data[].bids_usd | number | Yes | Total value of bid (long) orders within the range, in USD |
data[].bids_quantity | number | Yes | Total quantity of bid (long) orders within the range, as a number of coins |
data[].asks_usd | number | Yes | Total value of ask (short) orders within the range, in USD |
data[].asks_quantity | number | Yes | Total quantity of ask (short) orders within the range, as a number of coins |
data[].time | integer (int64) | Yes | Interval start time, timestamp in milliseconds (UTC) |
API Plans and Available Intervals
All API plans can call this endpoint; they differ in the data intervals they can use: the lower the plan, the longer the shortest available interval. For the price of each plan, see API Plans.
| API Plan | Access | Available 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, minimum 1 minute (1m) |
| Professional | ✅ Yes | All intervals, minimum 1 minute (1m) |
| Enterprise | ✅ Yes | All intervals, minimum 1 minute (1m) |
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.
This endpoint provides data through the REST API. Use the prompts above to have AI write the request code. For the tools available through MCP, see CoinGlass MCP.
Use Cases
| Scenario | Description |
|---|---|
| Watch Support and Resistance | When bid orders clearly exceed ask orders, buying support below is stronger; when the asks are thicker, selling pressure above is greater. |
| Track Liquidity Changes | Compare total order values at different times to judge whether market depth is thickening or thinning; when liquidity worsens, price is more prone to large swings. |
| Build Quant Factors | Use bid/ask imbalance metrics such as bids_usd / asks_usd as timing or risk-control factors, and backtest them with different range values. |
| Compare with Price Action | Align the data with Pair Price OHLC History by time to see whether changes in orders lead price. |
Related Endpoints
| Endpoint | How It Differs |
|---|---|
| Coin Aggregated Order Book Depth History (±Range) | Coin order book depth combined across multiple exchanges |
| Order Book History (Heatmap) | Order details for each individual price level, for drawing heatmaps |
| Large Order Book | Large limit orders currently in the order book |
| Spot Pair Order Book Depth History (±Range) | Spot version of the same data |
| Supported Exchanges and Pairs | Look up valid values for exchange and symbol |
FAQ
Do bids and asks mean longs and shorts?
They are not long and short positions. bids are bid orders and asks are ask orders. The “long” and “short” in the example comments on this page simply mean bid and ask orders and have nothing to do with long or short positions.
If I set range to 1, is that 1% or 100%?
It is 1%: orders within 1% above and below the price, and the default is 1. For Binance BTCUSDT, 2 and 5 also return data and can be used to look at a wider range; for other values, first confirm that data is returned.
Why did I get 3 data points when I passed limit=2?
When both start_time and end_time are passed, the number of returned data points follows the time range and can exceed limit. With interval=1h, a 3-hour time range and limit=2, 3 data points were returned. If you only want a fixed number of data points, pass only limit, or trim the results yourself after you receive them.
Are the values for 4h and 1d intervals cumulative over the interval?
No. Each data point is an order book snapshot at the start of the interval, not a sum or average over the interval. For example, interval=1d returns the orders at 00:00 (UTC) each day, and interval=1w takes the snapshot on each Monday.
Learn More: Futures Order Book Depth
What Is Order Book Depth?
Order book depth is how many buy and sell orders are resting within a given price range. The greater the depth, the smaller the price impact of large trades; the thinner the depth, the more easily price is pushed.
What Does a Bid/Ask Imbalance Indicate?
Bids that are clearly thicker than asks are often seen as stronger support below; thicker asks indicate greater selling pressure above. But orders can be canceled at any time, so if you use it on its own, you can easily be misled by fake orders; it is best to look at it together with trades and open interest.
Why Look at the Different ±1%, ±2% and ±5% Ranges?
±1% reflects the orders closest to the current price, which are the most likely to be filled; ±5% includes orders farther away and better reveals how large players are positioned. Comparing different ranges lets you judge whether orders are concentrated near the price or farther away.
