Spot Pair Order Book Depth History (±Range)

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.

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; they are buy and sell orders resting on the spot 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.

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 orders within the range, in USD
data[].bids_quantitynumberYesTotal quantity of bid orders within the range, as a number of coins, e.g., the number of BTC
data[].asks_usdnumberYesTotal value of ask orders within the range, in USD
data[].asks_quantitynumberYesTotal quantity of ask orders within the range, as a number of coins, e.g., the number of BTC
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 spot bid and ask depth within ±1% for Binance BTCUSDT over the last 7 days.
Compare spot and futures depth
Have AI write code that plots the spot and futures order book depth of the same trading pair on one chart.
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 Spot 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 Spot LiquidityCompare 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 FuturesAlign 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 FactorsUse 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

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

Query Params
string
required
Defaults to Binance

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

string
required
Defaults to BTCUSDT

Spot trading pair symbol; required, e.g., BTCUSDT. Exchanges write it differently, e.g., BTC-USDT on OKX and BTC-USD on Coinbase; for the pairs you can query, see the Spot Supported Exchanges and Pairs endpoint.

string
required
Defaults to 1d

Data interval; required, 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); optional, default 1, i.e., orders within 1% above and below the price; pass 2 for within 2% above and below. Which values return data depends on the range levels actually generated for that market; not every decimal value has data. 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