7 days Pro+ free · no cardStart my free trial

Liquidity, order books and liquidations · 3 / 5

Calculate execution VWAP by walking order-book depth

The best displayed ask is the price of the first available quantity, not necessarily the price of your whole order. A depth calculation makes that difference explicit and lets you reject an execution plan before its costs overwhelm the setup.

Athenum8 minUpdated:

Choose the benchmark before measuring slippage

For a buy, consume asks from lowest to highest until the desired quantity is filled. Execution VWAP is the sum of price multiplied by filled quantity, divided by total filled quantity. A sell walks bids in the opposite direction. If the observed depth is insufficient, report an incomplete estimate rather than assuming the rest fills at the last known price.

Slippage needs a reference: decision-time mid, arrival-time mid or the initial best quote are different benchmarks. For a buy versus a reference P, slippage in basis points is (VWAP − P) ÷ P × 10,000. State the benchmark so another person can reproduce the number. Fees are an additional component, not part of the raw execution VWAP.

Treat the snapshot as a scenario, not a reservation

The displayed book can change between observation and order arrival. Other traders may consume the same levels; quotes may cancel; hidden liquidity may improve execution. A static walk therefore answers what this snapshot would imply under stated assumptions, not what the exchange guarantees to fill.

Test adverse variants such as removing the first level or reducing nearby depth. Compare the resulting all-in cost with the expected move and risk budget. If a setup needs perfect execution to remain positive, the book calculation has identified a fragile plan rather than a reason to increase leverage.

Buying four units across three asks

Assume a 100.00 midprice and asks of 1 unit at 100.10, 2 at 100.20 and 2 at 100.40. A four-unit market buy fills 1, then 2, then 1 unit. Total cost before fees is 100.10 + 200.40 + 100.40 = 400.90, giving VWAP 100.225.

Against the 100.00 mid, slippage is 22.5 basis points. At an illustrative 0.05% taker fee, the fee is 0.20045 and total cash cost is 401.10045. If the first ask disappears before arrival, all four units fill at the next two levels under the unchanged-rest-of-book assumption: VWAP becomes 100.30, or 30 basis points above mid.

Hypothetical buy of four units; no replenishment or competing orders
Ask priceAvailable unitsUnits filledFill cost
100.1011100.10
100.2022200.40
100.4021100.40
Total54400.90
Original book
22.5 bps
First level removed
30 bps
Removing just the first level raises the snapshot's midprice slippage estimate from 22.5 to 30 basis points.

Splitting an order does not automatically remove impact

Smaller orders may reduce immediate depth consumption, but the market can move between slices and reveal information about persistent demand. You also create more time exposed to adverse movement and possibly different fees. Evaluate the full execution schedule with a consistent benchmark instead of assuming that every slice receives the initial best quote.

Before acting

  • Use a complete enough, recent book for the requested size.
  • Declare the slippage benchmark and direction.
  • Calculate VWAP from the quantities actually available at each level.
  • Add fees and a stress case for cancellation or competing flow.
  • Reject estimates whose unfilled remainder has no observed depth.

Check your understanding

Using the original book, what is VWAP for a three-unit buy and its slippage versus the 100.00 mid?

Show the explained answer

Cost is 1 × 100.10 + 2 × 100.20 = 300.50. VWAP is 300.50 ÷ 3 = 100.1667 approximately, or 16.67 basis points above mid. Fees remain additional, and the result assumes the snapshot is still executable.

Sources and further reading

Continue with Athenum