Pair Order Book Depth History (±Range)

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.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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.

Update frequencyEvery 5 seconds

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 Orders

Fields whose names contain bids are bid-side (buy) orders, and fields whose names contain asks are 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.

📘

range Is in %

range=1 means within 1% above and below the price, not 100%. Using different range values 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.

FieldTypeAlways ReturnedDescription
codestringYesBusiness status code; "0" means success
msgstringNoResult message
dataarray of objectYesArray of order book depth data, sorted from oldest to newest
data[].bids_usdnumberYesTotal value of bid (long) orders within the range, in USD
data[].bids_quantitynumberYesTotal quantity of bid (long) orders within the range, as a number of coins
data[].asks_usdnumberYesTotal value of ask (short) orders within the range, in USD
data[].asks_quantitynumberYesTotal quantity of ask (short) orders within the range, as a number of coins
data[].timeinteger (int64)YesInterval 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 PlanAccessAvailable Intervals (interval Parameter)
Hobbyist✅ Yes4 hours and above: 4h, 6h, 8h, 12h, 1d, 1w
Startup✅ Yes30 minutes and above: 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 1w
Standard✅ YesAll intervals, minimum 1 minute (1m)
Professional✅ YesAll intervals, minimum 1 minute (1m)
Enterprise✅ YesAll 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.

Fetch data with Python
Have AI write a Python function that gets the bid and ask depth within ±1% for Binance BTCUSDT over the last 7 days.
Build a bid/ask imbalance alert
Have AI write a script that prints an alert when bid or ask orders clearly outweigh the other side.
Understand this endpoint
Have AI explain the parameters and response fields in plain language.

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

ScenarioDescription
Watch Support and ResistanceWhen bid orders clearly exceed ask orders, buying support below is stronger; when the asks are thicker, selling pressure above is greater.
Track Liquidity ChangesCompare 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 FactorsUse 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 ActionAlign the data with Pair Price OHLC History by time to see whether changes in orders lead price.

Related Endpoints

EndpointHow 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 BookLarge limit orders currently in the order book
Spot Pair Order Book Depth History (±Range)Spot version of the same data
Supported Exchanges and PairsLook 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.

Query Params
string
required
Defaults to Binance

Exchange name, e.g., Binance, OKX. For the exchanges you can query, see the Supported Exchanges and Pairs endpoint.

string
required
Defaults to BTCUSDT

Trading pair symbol, e.g., BTCUSDT. Exchanges write trading pairs differently; for the pairs you can query, see the Supported Exchanges and Pairs endpoint.

string
required
Defaults to 1d

Data interval, e.g., 1d. Options: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 1w. The shortest interval you can use depends on your API plan: 4h for Hobbyist, 30m for Startup, and 1m for Standard and above.

int32
≤ 1000
Defaults to 1000

Number of data points to return; default 1000, accepts 1–1000. When both start_time and end_time are passed, the number of returned data points is determined by the time range and does not necessarily equal limit.

int64

Start time, timestamp in milliseconds (UTC), e.g., 1790812800000 (2026-10-01 00:00 UTC). The time of the returned data satisfies start_time ≤ time < end_time: the start time is included and the end time is excluded.

int64

End time, timestamp in milliseconds (UTC), e.g., 1792022400000 (2026-10-15 00:00 UTC). The time of the returned data satisfies start_time ≤ time < end_time: the start time is included and the end time is excluded. If the start and end times are omitted, the current time is used as the end point and the range is calculated backward by interval × limit; an end time later than the current time is treated as the current time.

string
Defaults to 1

Price range for counting orders (± percentage); default 1, i.e., orders within 1% above and below the price; pass 2 for within 2% above and below. Not every value has data, and the available values may differ by market; before using a value other than 1, first confirm that data is returned. For Binance BTCUSDT, 1, 2 and 5 all return data.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json