Get the order book depth history of a spot 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 in the spot market.
| 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; they are buy and sell orders resting on the spot 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.
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 orders within the range, in USD |
data[].bids_quantity | number | Yes | Total quantity of bid orders within the range, as a number of coins, e.g., the number of BTC |
data[].asks_usd | number | Yes | Total value of ask orders within the range, in USD |
data[].asks_quantity | number | Yes | Total quantity of ask orders within the range, as a number of coins, e.g., the number of BTC |
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 Spot 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 Spot Liquidity | Compare total order values at different times to judge whether spot market depth is thickening or thinning; when depth thins, price is more prone to large swings. |
| Compare Spot and Futures | Align the data by time with the futures endpoint Pair Order Book Depth History (±Range) to see which order book, spot or futures, has the stronger bids or asks. |
| 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. |
Related Endpoints
| Endpoint | How It Differs |
|---|---|
| Spot Coin Aggregated Order Book Depth History (±Range) | Coin order book depth combined across multiple spot exchanges |
| Spot Order Book History (Heatmap) | Spot order details for each individual price level, for drawing heatmaps |
| Spot Large Order Book | Large limit orders currently in the spot order book |
| Pair Order Book Depth History (±Range) | Futures version of the same data |
| Spot 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; what is counted are the buy and sell orders within the range on the spot order book. The “long” and “short” in the example comments on this page simply mean bid and ask orders.
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. You can change it to 2, 5 and so on to look at a wider range.
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.
Learn More: Spot Order Book Depth
What Is Spot 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 buys and sells; the thinner the depth, the more easily price is pushed.
How Is Spot Depth Different from Futures Depth?
Spot orders buy and sell the coin itself, while futures orders can use leverage, so the depth of the two can differ greatly. At 2026-10-20 01:00 (UTC), bid orders within 1% above and below the price for Binance BTCUSDT totaled about $26.73 million on spot and about $212 million on futures, nearly 8 times the spot amount.
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.
