Order Book Technical Reference
Limit Order Definition and Partial Execution
A limit order is an instruction from a trader to buy or sell a specified quantity of an asset at a specified price or better. The order will only be executed if the market price meets the conditions set by the trader.
Let us define:
: the limit price set by the trader.
: the current market price.
: the total quantity of the asset in the order.
For a buy limit order, the condition for execution is:
For a sell limit order, the condition for execution is:
If the respective condition is met, the order is executed for the available quantity at the best available price up to for buys or down to for sells.
Partial Fill and Remaining Order
When a limit order is partially filled, only a portion of the order's total quantity is executed. The remaining unfilled quantity remains in the order book at the original limit price until it is fully filled or canceled.
Let us define:
: the initial quantity specified in the limit order.
: the quantity that has been executed (filled).
: the remaining quantity after partial fill.
The relationship between these quantities is:
The limit price remains unchanged after partial execution.
Price Calculation and Asset Quantities
In the context of exchanging assets, the price and quantities are represented as follows:
: the quantity of the asset being offered (e.g., currency being sold).
: the quantity of the asset being asked for (e.g., currency being bought).
: the price at which the exchange occurs, defined as:
After a partial fill, the quantities are updated:
: the amount of the offered asset that has been executed.
: the amount of the asked asset that has been received in exchange.
: the updated offered quantity.
: the updated asked quantity.
The price $P$ remains unchanged for the remaining unfilled portion:
Summary
After a limit order is partially filled, the unfilled portion of the order remains active in the order book at the same limit price . The execution continues to adhere to the original conditions until the entire order is filled or canceled. The consistent price ensures that the ratio of the offered and asked quantities remains constant for the remaining order.
This mechanism allows traders to maintain control over the price at which they buy or sell an asset, even if their order cannot be filled immediately in its entirety.
Last updated