DEV Community

Cover image for Polymarket Order Book Imbalance: Reading Market Depth
Nagi
Nagi

Posted on

Polymarket Order Book Imbalance: Reading Market Depth

Learn how Polymarket order book imbalance measures bid and ask pressure, when it contains useful information, and how to test it quantitatively.

What Order Book Imbalance Reveals About Polymarket Markets

A Polymarket price tells you where the market is trading. The order book tells you something different: how much liquidity is positioned around that price.

That distinction matters. Two markets can both trade at $0.55 while having completely different distributions of bids and asks. One may have substantial buying interest below the midpoint; another may have very little depth on either side. Treating those books as equivalent throws away information.


Contacts

Nagi writes about Polymarket bots, algorithmic trading, quantitative strategies, Python automation, Web3, and prediction-market infrastructure.

Github: https://github.com/nagi777x/Polymarket-Trading-Bot
Telegram: https://t.me/nagi_777x


The research question is therefore not simply whether order imbalance predicts price.

It is:

Does Polymarket order book imbalance contain information about short-horizon price movement that is not already explained by price, spread, and market depth?

Polymarket's CLOB exposes order-book data for outcome tokens, including bids and asks, while its market-data infrastructure provides real-time book updates. ([GitHub][2])

The Core Measurement

The simplest order imbalance statistic is:

OI_t=\frac{B_t-A_t}{B_t+A_t}
Enter fullscreen mode Exit fullscreen mode

where:

  • (B_t) = bid volume
  • (A_t) = ask volume
  • (OI_t) ranges from -1 to +1

An imbalance of +0.60 means substantially more displayed volume exists on the bid side than the ask side under the chosen measurement window.

But there is an important problem: what counts as volume?

Using every level in the order book can produce a very different signal from measuring only the first level.

A better research framework is therefore to calculate imbalance at several depths:

OI^{(k)}_t=
\frac{\sum_{i=1}^{k}B_{i,t}-\sum_{i=1}^{k}A_{i,t}}
{\sum_{i=1}^{k}B_{i,t}+\sum_{i=1}^{k}A_{i,t}}
Enter fullscreen mode Exit fullscreen mode

Here, (k) represents the number of price levels included.

This produces a useful distinction:

  • Level-1 imbalance: immediate pressure near the best bid and ask.
  • Multi-level imbalance: broader liquidity positioning.
  • Depth-weighted imbalance: gives greater importance to liquidity closer to the midpoint.

The official documentation defines the midpoint as the average of the best bid and best ask. ([Polymarket Documentation][3])

Why Raw Imbalance Is Not a Signal by Itself

Suppose a hypothetical market has:

  • Best bid: $0.54
  • Best ask: $0.56
  • Bid volume: 1,000
  • Ask volume: 400

The simple imbalance is:

OI=\frac{1000-400}{1000+400}=0.429
Enter fullscreen mode Exit fullscreen mode

That looks strongly bid-heavy.

But there are at least three possible interpretations.

Interpretation A: buyers are aggressively supporting the current price.

Interpretation B: sellers have temporarily withdrawn liquidity.

Interpretation C: large displayed bids are passive orders that may disappear before execution.

The order book alone cannot distinguish these explanations.

That is why order imbalance should initially be treated as a state variable, not a directional prediction.

The interesting question is what happens after the imbalance appears.

A Better Research Design: Imbalance → Response

Instead of asking:

“Does positive imbalance predict higher prices?”

test:

“Conditional on the same price, spread, and depth, does a change in imbalance alter the probability of a subsequent price move?”

For each timestamp (t), construct:

\Delta OI_t = OI_t-OI_{t-\Delta}
Enter fullscreen mode Exit fullscreen mode

Then measure future midpoint returns:

r_{t,h}=\ln\left(\frac{M_{t+h}}{M_t}\right)
Enter fullscreen mode Exit fullscreen mode

where (M_t) is the midpoint and (h) is the forecast horizon.

This creates a clean experiment:

Book state → imbalance change → future midpoint movement

rather than simply correlating a static book snapshot with price.

The important control variables

A useful regression or classification dataset should include:

  • current midpoint
  • spread
  • bid volume
  • ask volume
  • total depth
  • imbalance
  • change in imbalance
  • recent trade direction
  • recent volatility
  • time remaining in the market
  • market category
  • distance from extreme probabilities

The purpose is not to build the most complicated model possible.

It is to determine whether imbalance contributes incremental information.

Python Experiment

The following synthetic example calculates multi-level imbalance. It does not represent observed Polymarket performance.

def order_book_imbalance(bids, asks, levels=3):
    """
    bids/asks: [(price, size), ...]
    Synthetic/research example.
    """
    bid_volume = sum(size for _, size in bids[:levels])
    ask_volume = sum(size for _, size in asks[:levels])

    total = bid_volume + ask_volume

    return 0.0 if total == 0 else (bid_volume - ask_volume) / total


bids = [
    (0.54, 500),
    (0.53, 300),
    (0.52, 200),
]

asks = [
    (0.56, 200),
    (0.57, 150),
    (0.58, 100),
]

print(order_book_imbalance(bids, asks, levels=3))
Enter fullscreen mode Exit fullscreen mode

The production version should reconstruct the book from validated market-data events rather than repeatedly assuming that a single snapshot represents the entire state.

Polymarket's public market WebSocket provides book and price-change events, making event-driven reconstruction possible. ([GitHub][4])

What Order Imbalance Can Reveal

The most useful interpretation is often liquidity asymmetry.

A persistent positive imbalance can indicate that displayed liquidity is concentrated toward bids. A rapidly increasing imbalance may indicate a changing order-book state even before the midpoint moves.

But there is a second, more subtle signal:

Imbalance persistence

Consider two observations with (OI=0.50).

In Market A, the imbalance disappears within seconds.

In Market B, it remains elevated across many book updates.

Those observations should not necessarily receive the same interpretation.

This suggests an original research feature:

Persistence(T)=\frac{1}{T}\int_0^T |OI_t|dt
Enter fullscreen mode Exit fullscreen mode

A second feature can measure directional consistency:

SignConsistency=
\frac{|\sum_t sign(OI_t)|}{N}
Enter fullscreen mode Exit fullscreen mode

The first measures how long imbalance persists.

The second measures how consistently it points in one direction.

Together, they distinguish a persistent structural book from a transient liquidity shock.

What Can Go Wrong?

The biggest mistake is interpreting displayed liquidity as committed liquidity.

Orders can be cancelled. A large bid does not necessarily imply an equally large future demand for the outcome token.

Other problems include:

Stale state. Missing or duplicated events can corrupt reconstructed depth.

Selection bias. Studying only liquid markets may produce conclusions that do not generalize to thin markets.

Look-ahead bias. Features must be calculated only from information available at timestamp (t).

Spread effects. A large imbalance may coexist with a wide spread, making the apparent signal difficult to monetize.

Time-to-resolution effects. The meaning of displayed liquidity can change substantially as an event approaches resolution.

Price dependence. An imbalance near $0.50 should not automatically be interpreted the same way as one near $0.95.

Testing the Hypothesis Properly

A strong experiment separates four layers:

Hypothesis: order-book imbalance contains incremental information about short-horizon price changes.

Experiment: calculate imbalance from historical book states and compare future midpoint movement across imbalance buckets.

Observed result: report measured conditional returns, hit rates, persistence, and statistical uncertainty.

Interpretation: determine whether the relationship survives controls for spread, volatility, depth, and market type.

A useful validation sequence is:

  1. Split markets by liquidity.
  2. Calculate imbalance at multiple depths.
  3. Test several forecast horizons.
  4. Control for spread and recent returns.
  5. Perform out-of-sample validation.
  6. Repeat across different market regimes.

The key result is not whether the raw correlation is positive.

It is whether the relationship survives conditioning.

Practical Example

Consider a hypothetical BTC Up market trading around $0.62.

The top three levels show:

  • $0.61 bid: 800
  • $0.60 bid: 600
  • $0.59 bid: 400
  • $0.63 ask: 250
  • $0.64 ask: 200
  • $0.65 ask: 150

The three-level imbalance is:

\frac{1800-600}{1800+600}=0.50
Enter fullscreen mode Exit fullscreen mode

A naive system might label this bullish.

A research system should instead record:

State: strong bid-side depth.

Then observe what happens next.

If the imbalance repeatedly precedes upward midpoint movement after controlling for spread and recent returns, it becomes an empirical feature worth investigating.

If it disappears without price movement, it may primarily describe liquidity rather than directional information.

That distinction is the central point.

Advanced Extensions

Experienced researchers can extend the framework in several directions:

  1. Depth-weighted imbalance — weight levels according to distance from the midpoint.
  2. Order-flow imbalance — combine book changes with executed trades.
  3. Regime detection — estimate separate relationships for calm and high-volatility periods.
  4. Cross-market features — compare related Polymarket contracts or external reference markets.
  5. Online calibration — continuously measure whether the predictive relationship is strengthening or degrading.

Production Considerations

A production research pipeline should maintain a timestamped local book, validate sequence consistency, detect stale state, and periodically reconcile reconstructed state against authoritative snapshots.

The important engineering principle is simple:

A signal calculated from corrupted market state is not a quantitative signal.

Polymarket provides public CLOB market-data interfaces and official developer documentation for accessing market information. ([Polymarket Documentation][1])

Key Takeaways

  • Polymarket order book imbalance measures liquidity asymmetry, not probability directly.
  • Level-1 and multi-level imbalance answer different research questions.
  • Changes and persistence may be more informative than a single snapshot.
  • Displayed liquidity should not automatically be interpreted as committed trading intent.
  • The correct test is incremental information after controlling for price, spread, depth, volatility, and time.
  • Historical replay and out-of-sample testing are necessary before treating imbalance as a useful Polymarket signal.

FAQ

Is order book imbalance predictive on Polymarket?

That is an empirical question. It should be tested by measuring future price or midpoint changes conditional on imbalance while controlling for other market variables.

What is the best formula for Polymarket order book imbalance?

The basic formula is (bid volume − ask volume) / (bid volume + ask volume). Multi-level and depth-weighted versions can provide richer representations.

Should I use the entire order book?

Not necessarily. Comparing Level-1, top-3, top-5, and distance-weighted measures is itself a useful experiment.

Is order imbalance the same as order flow?

No. Order imbalance describes displayed liquidity. Order flow generally incorporates changes and/or executed trades. They capture different aspects of market microstructure.

Can imbalance be used as a standalone trading signal?

It should not be assumed to be one. A useful research process first establishes whether imbalance provides incremental predictive information after accounting for other observable variables.

Disclaimer

This article is for educational and research purposes only. Trading prediction markets involves market, liquidity, execution, model, and capital risk. No strategy discussed here guarantees profit.

Conclusion

The most useful way to think about Polymarket order book imbalance is not as a magic directional indicator, but as a measurement of how liquidity is distributed around the current market price.

The research opportunity is deeper: measure how that distribution changes, how long it persists, and whether those changes contain information beyond price itself.

For engineers and quantitative researchers, that turns the order book from a visual trading interface into a structured dataset for studying liquidity, information arrival, execution pressure, and short-horizon market behavior.

Top comments (0)