Crypto order book imbalance compares visible bid and ask quantities within a stated depth window. The normalized formula is (B − A) ÷ (B + A), where B and A are the selected bid and ask quantities. Positive values mean more displayed bid quantity; negative values mean more displayed ask quantity. It measures a book snapshot, not executed buying, hidden liquidity or a guaranteed price move.
The difficult part is defining the quantities before applying the formula. A book can be bid heavy at its best quotes and ask heavy a few levels farther away. An indicator that changes sign when you expand the window has changed its measurement scope; the market need not have changed at all.
Calculate the normalized difference
Choose one venue, exact instrument, observation time and depth rule. Add the selected resting bid quantities to obtain B and the selected resting ask quantities to obtain A. Both totals must use compatible units.
The calculation is:
imbalance = (B − A) / (B + A)
For the best bid and best ask alone, this is the queue-imbalance definition used by Gould and Bonart in their original research. Applying the same arithmetic to several levels is a broader visible-depth measure; label that extension.
When both sides have positive quantity, the result lies between −1 and +1. Zero means equal selected quantities. If one side is zero and the other positive, the mathematical result reaches an endpoint, but a missing side also requires a data-validity check. If both totals are zero, the denominator is zero: report the value as unavailable.
Some tools show bid share instead: B / (B + A). Convert it using imbalance = 2 × bid share − 1. Thus a bid share of 80% corresponds to normalized imbalance of +0.60. Neither number is an 80% or 60% probability that price will rise.
Also distinguish quantity from order count. Eight tokens resting at a price might belong to one order or several. A book aggregated by price does not establish how many independent traders are represented.
One hypothetical book gives three different readings
The following invented spot-token book uses USDT prices and base-token quantities. Each row shows quantity at that price, rather than cumulative quantity. The best bid is 99.90, the best ask is 100.10 and their midpoint is 100.00.
| Level from best quote | Bid price | Bid quantity | Ask price | Ask quantity |
|---|---|---|---|---|
| 1 | 99.90 | 8 | 100.10 | 2 |
| 2 | 99.80 | 1 | 100.20 | 6 |
| 3 | 99.70 | 1 | 100.30 | 7 |
At the best quotes, B is 8 and A is 2. The score is (8 − 2) / (8 + 2) = +0.60.
Across all three displayed levels, B is 8 + 1 + 1 = 10 and A is 2 + 6 + 7 = 15. The score becomes (10 − 15) / 25 = −0.20. The larger ask quantities farther from the midpoint reverse the sign.
Now use a price band extending 20 basis points from the midpoint on each side. Twenty basis points is 0.20%, giving inclusive boundaries of 99.80 and 100.20. This includes the first two levels on each side: B is 9, A is 8 and the score is 1 / 17 ≈ +0.0588.
| Selection rule | B | A | B + A | Normalized imbalance |
|---|---|---|---|---|
| Best quotes only | 8 | 2 | 10 | +0.6000 |
| Three levels per side | 10 | 15 | 25 | −0.2000 |
| Within 20 basis points of midpoint | 9 | 8 | 17 | +0.0588 |
These results describe the same instant. A threshold such as “positive imbalance” is incomplete until the selection rule is attached.
A fixed number of levels does not necessarily cover a fixed price distance, especially when prices have gaps. A midpoint band makes distance explicit, but membership changes when the midpoint changes. Record whether you recenter the band on every observation or hold a reference fixed.
For a band calculation, confirm the feed reaches both price boundaries. If the subscription stops before either boundary, the selected depth is truncated; do not present its sum as a complete band.
For one spot pair, base quantity is a clear convention. A quote-notional version would multiply each quantity by its own price before summing, creating a different measure. Across derivatives, normalize contract sizes before combining anything. Do not add tokens, USDT and contract counts into one denominator.
Watch the denominator when orders disappear
Continue the hypothetical example within the fixed price interval from 99.70 to 100.30. Assume every change below is a cancellation, with no trades or new orders. Any levels outside the interval remain excluded.
At t1, cancel the six tokens offered at 100.20 and seven at 100.30. At t2, cancel seven of the eight tokens bid at 99.90, leaving one there.
| State | Selected bid quantity | Selected ask quantity | Total visible quantity | Imbalance |
|---|---|---|---|---|
| t0: original book | 10 | 15 | 25 | −0.2000 |
| t1: deeper asks canceled | 10 | 2 | 12 | +0.6667 |
| t2: most best-bid quantity canceled | 3 | 2 | 5 | +0.2000 |
The jump from −0.20 to about +0.67 involves no new bid quantity and no executed buying. It comes entirely from offers disappearing. The best bid and ask remain 99.90 and 100.10 throughout, so the midpoint stays unchanged.
By t2, the book is still bid heavy, but only five selected tokens remain. A book containing 0.03 bid tokens and 0.02 ask tokens would also score +0.20 while containing one hundredth as much quantity. A normalized ratio cannot tell you whether enough depth exists for an intended order.
On Bybit's standard orderbook stream, a zero-size update can follow a fill or cancellation. It does not identify the cause by itself. Our timeline supplies cancellation labels as hypothetical assumptions; a real observer needs additional evidence to classify events.
A large displayed order that disappears deserves investigation, but that observation alone cannot establish manipulation or the participant's intent. Record persistence, price changes and relevant trades without inventing motives.
Keep resting quantity separate from executed flow
Order book imbalance describes a stock of displayed quantities at an instant. Cumulative volume delta accumulates signed executed volume over an interval. A positive book reading can coexist with seller-initiated trades because the two measurements describe different objects.
Order flow imbalance is another distinct construction. It measures changes across book events, which can include submissions, cancellations and executions. Cont, Kukanov and Stoikov's original study examines that event-based measure in US equities. Taking the difference between two snapshot-imbalance ratios does not automatically reproduce their method.
For a price estimate using best-quote quantities, the microprice versus midprice comparison develops the relationship between queue weighting and quoted prices. An imbalance ratio remains dimensionless; it is not itself an executable price.
Execution cost requires another calculation. The slippage and depth worksheet walks a requested quantity through price levels. A favorable imbalance does not replace that size-specific check, because the ratio pools quantities without modeling which prices your order would consume.
Visible depth leaves important quantities unknown
Displayed quantity need not equal an order's full remaining size. Kraken documents iceberg orders with a visible display quantity and a hidden remainder that can replenish it. A public snapshot cannot recover that remainder simply by summing the visible rows.
Feed coverage also matters. Bybit's standard orderbook channel explicitly excludes Retail Price Improvement orders. Its separate RPI orderbook channel provides distinct ordinary and RPI quantity fields. Attribute an exclusion to the channel used instead of assuming every feed from the venue has identical coverage.
These are documented implementations, not a universal list of hidden liquidity. Record what your source includes, what it excludes and what remains unknown. Replenishment is observable over time; the full hidden quantity or its owner's future willingness to trade may remain unobservable.
Similarly, one venue's spot book is not the global market. A perpetual book, another spot venue and a different quote-currency pair have separate orders. An aggregate needs synchronized observations, compatible units and explicit coverage before its sign can be interpreted.
Validate the book before trusting the formula
A correct formula can summarize corrupted state. For Bybit's documented standard stream, a new snapshot replaces the local book; delta updates insert new prices, replace existing quantities and delete zero-quantity entries. Its level-1 subscriptions for spot, linear and inverse instruments are snapshot-only, so a consumer must not wait for deltas on those subscriptions. Treating an updated size as an amount to add would inflate depth. Follow the selected feed's protocol rather than assuming all venues share these rules. Bybit: snapshot and delta processing.
A useful worksheet keeps the calculation and its evidence together:
| Field | Record before using the score |
|---|---|
| Market | Venue, exact symbol, spot or derivative, quantity units |
| Coverage | Channel, depth reaching requested bounds and known exclusions |
| Window | Best quotes, number of levels or price band; boundary rules |
| State | Snapshot identity, accepted updates and unresolved gaps |
| Timing | Exchange timestamp, local receive time and observation age |
| Arithmetic | B, A, B + A, sign convention and resulting score |
| Eligibility | Conditions that make the observation unavailable |
Use this worksheet on the three-level example, then deliberately remove an update or provide an empty book. An uncertain reconstruction should become unavailable until recovered. It should not become a neutral zero or silently retain the last attractive score.
Test a proposed rule on the information actually available
Gould and Bonart found a relationship between best-quote imbalance and the direction of the next midpoint movement in ten Nasdaq stocks using 2014 data, with strength differing across relative tick sizes. That is evidence about a particular market sample and target. It does not establish a profitable crypto rule after costs and latency. Original study and methodology.
A crypto test therefore needs its own recorded books and observation times. Fix the window and any threshold before evaluation. Use later chronological data for validation, and define whether the outcome is the next quote change, a return over a fixed interval or an actual fill result. Those are different targets.
If observations are joined to candles, use explicit interval boundaries and retain the point when the book was received. The candle resampling guide addresses the related problem of assigning market events to time intervals. A later repaired book should not appear available to an earlier decision.
Before approving any use of the indicator, reproduce one observation from its raw quantities and repeat it under a wider window and a cancellation case. Keep the score beside total depth, freshness and coverage. That small record reveals whether the apparent signal comes from substantial resting quantity, a thin denominator or a different slice of the book.
