Slippage on an order book · Calculation guide

Walk the available depth to estimate average price and unfilled size.

Calculation guide

One snapshot of executable opposite-side quotes. Levels are sorted best first. Report only available fills and benchmark against the best quote.

Fill best levels until order quantity or liquidity runs out.

Inputs

Order quantity

Example entry 100.

Order side

Select one of the listed cases (Buy / Sell).

Price per unit

Example entry 100 (in the selected currency). Minimum 1e-08.

Units

Example entry 40. Minimum 1e-08.

Worked example

InputValue
Order quantity100
Order sideBuy

Available price levels

Price per unitUnits
10040
102100
ResultValue
Average fill price101.2
Slippage cost on filled units120
Unfilled units0

How each input affects this example

Each row starts from the worked example and changes one input.

InputOriginal inputNew inputAffected resultOriginal resultNew result
Order quantity100110Average fill price101.2101.272727
Order sideBuySellAverage fill price101.2102
Price per unit (row 1)100110Average fill price101.2102
Units (row 1)4044Average fill price101.2101.12
Slippage on an order book →