October 22, 2026

Order Book Pressure Signals: A Practical Guide

Order book pressure measures how resting liquidity is split between the bid and the ask side of an order book at a given moment. It is one of the simplest order book signals to compute, and one of the easiest to misuse. This guide covers what it is, how it differs from order flow imbalance, a worked EURUSD example, Python code, and where the signal breaks down.

Definitions

Order book pressure is a snapshot ratio: the volume (or notional) resting on the bid side divided by the total resting on both sides, within some distance of the current price.

pressure = bid_depth / (bid_depth + ask_depth)

It always lies between 0 and 1. Values above 0.5 mean more liquidity is waiting to buy than to sell; values below 0.5 mean the opposite. Because it is computed from a single snapshot, it describes how traders are positioned, not what they just did.

Three choices change the number a lot, so fix them before you test anything:

  • Depth window: top of book only, the first N levels, or everything within x% of the mid price. Wider windows are smoother and slower.
  • Units: order count, quantity, or notional in quote currency. Notional is comparable across price levels; counts are not.
  • Sampling frequency: every update, every second, or a periodic snapshot. Some venues only publish periodic snapshots.

Order flow imbalance (OFI) is the dynamic counterpart. It measures changes at the best bid and ask between two updates: liquidity added on the bid or removed from the ask counts as buying pressure, and the reverse as selling pressure. Cont, Kukanov and Stoikov (2014) showed that OFI explains a large share of short-horizon price changes in US equities. Pressure tells you where liquidity sits; OFI tells you how it is moving. They are complementary, not interchangeable.

Trade imbalance looks at executed trades instead of resting orders: aggressive buy volume minus aggressive sell volume over a window. It reflects what traders paid to do rather than what they are offering to do.

A EURUSD example

In April 2025 the US tariff announcements pushed the dollar sharply lower. We looked at order book pressure on EURUSD over January to mid-April 2025, using order book snapshots from Oanda published every 20 minutes and aggregated to a daily value.

The raw pressure series is noisy, so we did not trade the level. Instead we flagged outliers relative to the previous week: days when pressure was unusually far from its recent typical value. A spike in bid-side pressure was read as informed buying interest (follow the move); a spike on the ask side triggered a reversal of the position. With a 0.01% fee on every trade, this simple rule tracked the dollar sell-off well over that window. The full write-up, with charts, is in Whispers of the Future? Decoding EURUSD with Order Book Pressure.

Read that result for what it is: one currency pair, three and a half months, a strongly trending period, and no out-of-sample test. It shows the signal is worth investigating, not that it is a strategy. See the limitations below before you build on it.

Python: compute pressure and flag outliers

The code below works on any table of order book levels with a side, a price and a size. The first part fetches Oanda order book snapshots through AuraStream (free plan: 500 calls a month; you need your own Oanda account and token). If you already have order book data from another source, skip straight to pressure().

import requests
import pandas as pd

URL = "https://api.aurastream.unbiased-alpha.com/timeseries"
HEADERS = {"x-api-key": "YOUR_AURASTREAM_API_KEY"}

resp = requests.post(URL, headers=HEADERS, timeout=120, json={
    "tickerlist": ["EUR_USD"],
    "start": "2025-01-01",
    "end": "2025-04-12",
    "interval": "1d",
    "source": "oanda",
    "dtype": "orderbook",
    "credentials": {
        "id": "YOUR_OANDA_ACCOUNT_ID",
        "token": "YOUR_OANDA_TOKEN",
        "environment": "practice",
    },
})
resp.raise_for_status()
raw = resp.json()["EUR_USD"]  # {timestamp: snapshot}


def pressure(levels: pd.DataFrame, mid: float, window: float = 0.005) -> float:
    """Share of resting size on the bid side within +/- window (fraction of mid).

    levels: one row per price level with columns side ('bid'/'ask'), price, size.
    """
    near = levels[(levels.price - mid).abs() <= window * mid]
    bid = near.loc[near.side == "bid", "size"].sum()
    ask = near.loc[near.side == "ask", "size"].sum()
    return bid / (bid + ask) if bid + ask > 0 else float("nan")


def flag_outliers(p: pd.Series, lookback: int = 5, z: float = 2.0) -> pd.Series:
    """+1 / -1 when pressure is unusually high / low versus the previous `lookback` points."""
    mean = p.shift(1).rolling(lookback).mean()
    std = p.shift(1).rolling(lookback).std()
    score = (p - mean) / std
    return score.gt(z).astype(int) - score.lt(-z).astype(int)


# Example with a toy snapshot; replace with snapshots parsed from `raw`
snap = pd.DataFrame({
    "side": ["bid", "bid", "bid", "ask", "ask", "ask"],
    "price": [1.0848, 1.0846, 1.0844, 1.0852, 1.0854, 1.0856],
    "size": [3.1, 2.4, 1.9, 1.2, 1.5, 2.0],
})
print(round(pressure(snap, mid=1.0850), 3))  # 0.614: more resting size on the bid

Two details matter more than the model you put on top. The rolling statistics use shift(1), so each point is compared only with data that existed before it; dropping that shift is a classic look-ahead bug. And the depth window is a parameter like any other: pick it before looking at the backtest, or test several and report all of them.

Ready-made order book signals: Nemeton

Computing pressure yourself means collecting, storing and cleaning order book data, which is the expensive part. Nemeton is our API that delivers order book signals (pressure, trade imbalance and cumulative depth) ready to use, at intraday frequencies. It costs $250 a month, includes everything in the AuraStream API Integration plan, and starts with a 15-day free trial (see plans).

Limitations

  • Resting orders are not commitments. Limit orders can be cancelled in milliseconds, and some are placed to be seen rather than filled. Pressure built from size alone cannot tell genuine interest from spoofing.
  • FX has no single order book. Spot FX trades across many venues and dealers. A broker’s book, such as Oanda’s, reflects that broker’s clients, not the whole market. Treat it as a sentiment sample, not the market’s liquidity.
  • Snapshot frequency limits the horizon. A 20-minute snapshot cannot support a strategy that trades on seconds. Match the holding period to how often the data is updated.
  • Hidden and iceberg orders are invisible. Futures and equity venues allow orders that do not show their full size, so displayed depth understates real liquidity.
  • Regime dependence. Signals that work in a trending, news-driven period (like April 2025) often fade in quiet ranges. Test across regimes and keep an out-of-sample period you do not touch until the end.
  • Costs. Order book signals tend to trade often. Include realistic spreads, fees and slippage; a signal that looks good before costs frequently does not survive them.

FAQ

What is order book pressure?

The share of resting bid liquidity in the total resting liquidity near the current price, measured from one order book snapshot. It ranges from 0 (all ask) to 1 (all bid).

How is it different from order flow imbalance?

Pressure is static: it describes the book at one moment. Order flow imbalance is dynamic: it measures changes at the best bid and ask between updates. Pressure shows positioning; OFI shows activity.

Does order book pressure predict prices?

Sometimes, over short horizons and in some regimes. Academic work finds order book imbalance has short-term predictive power, but the effect is small, decays quickly and is easily eaten by costs. Treat it as one input to test, not a standalone strategy.

What data do I need?

Order book snapshots or updates with price and size per level for both sides. Exchange-native feeds (crypto exchanges, futures venues) give the full displayed book; in FX you usually get a broker’s or venue’s book.

What depth window should I use?

There is no universal answer. Top-of-book reacts fastest but is noisy; wider windows are steadier. Choose based on your holding period, and fix it before you backtest.

Can I get order book pressure without building the data pipeline?

Yes. Nemeton provides pressure and related order book signals through an API, and AuraStream gives access to raw order book data from supported sources such as Oanda and Binance.

In this article:
What order book pressure is, how it differs from order flow imbalance, a EURUSD example, Python code and the limitations to know before trading it.
Share on social media:
Facebook
Twitter
LinkedIn
Telegram