Orders and executionMarket Foundations

Market order

On this page

In brief

An instruction to execute promptly at available prices. The fill depends on liquidity and execution timing.

How does a market order get its execution price?

A market order seeks prompt execution at available prices. A buy takes offers and a sale takes bids. The last transaction shown on a chart is an earlier trade, potentially for a different size. For an exercise, log the quote on the relevant side at submission and the actual weighted fill separately.

Assume the best offer is 30 units at 12, followed by 90 units at 12.10. A simulated purchase of 90 takes 30 at the first level and 60 at the second. The average fill is about 12.067 and the order costs 6 more than the reference of 12 per unit. Record the difference as execution slippage.

What is the trade-off between market and limit orders?

A market order prioritises prompt execution. A limit order places a cap on what a buyer pays or a floor on what a seller accepts. Estimate execution across levels when the exercise prioritises exiting promptly. If it prioritises a price boundary, record no fills, partial fills and cancellations as possible outcomes. A halt or unavailable counterparties can also affect execution.

Compare two simulated orders of the same size, one in an active period and one with thinner quotes. Save the quote and spread first, then log average price, total amount and fill time. Consistent fields reveal how execution conditions changed the result.

Track order status beyond the button click

A submitted message is not an accepted or fully filled order. Keep its identifier and check its status before retrying during a delay; repeated clicks can create duplicate instructions.

If forty of one hundred units fill, forty are held while sixty remain a potential exposure. Track intended, filled and remaining quantities separately. Partial completion already creates position risk.

Plan for exceptional execution conditions

Market orders may face different handling during halts, auctions or sparse quotes. Availability depends on venue and provider rules. Start with a defined continuous session, then model how a pause and reopening change the order state.

An urgent exit plan still needs a trigger, an exposure tolerance and a method for confirming status. A fill can occur before a cancellation arrives. Update holdings from confirmed outcomes, not the fact that a request was sent.

Make a fair comparison with a limit order

Use the same book, subsequent quotes, size and decision time for both methods. Record market costs and limit waiting, partial fills and unfilled quantities. Compare cost, completion and exposure while waiting rather than an actual fill against an imagined limit price.

Set the comparison horizon in advance and retain every outcome. A costlier order may complete an essential exit; a better price may leave an incomplete position. Judge against the original task and reconcile average fills and remaining exposure.

The GUTL perspective

A market order prioritises execution. Review both its speed and the price paid for that speed.

Everyday example

Buying an immediately available train ticket prioritises catching the train. Available seats can change the final price.

Simulation example

A simulated buy for 20 units fills eight at 100.20 and 12 at 100.25. The weighted average fill price is 100.23.

How do you calculate the average price of a partly filled market order?

Multiply each fill price by its filled size, sum those amounts and divide by the total filled size. Record unfilled quantity separately, along with fees, to preserve both execution price and completion.

Student comments

Further reading

3 articles