Definition
A market order instructs a broker to buy or sell immediately at the best prices currently available. It prioritizes speed of execution over price certainty, so the execution price is not confirmed in advance.
How it works
A market buy order fills against the lowest offers and a market sell order against the highest bids. If the displayed quantity at the best price is smaller than the order, the remainder fills at the next levels, so one order can receive several prices and the average can be worse than the quote you saw.
Prices can change between the moment you see a quote and the moment your order reaches the market, particularly in fast, thinly traded or after-hours conditions. Some brokers add protective price bands, and some sessions or assets do not accept market orders.
Formula / convention
Average fill price = sum of (price × quantity) for each fill ÷ total quantity filled
Illustrative example
Illustrative: a fictional share shows asks of 100 shares at HK$20.10, 200 at HK$20.15 and 300 at HK$20.20. A market order for 400 shares fills 100 × 20.10 + 200 × 20.15 + 100 × 20.20 = 2,010 + 4,030 + 2,020 = HK$8,060, an average of 20.15. That is HK$0.05 per share, or HK$20 in total, above the displayed best ask of HK$20.10.
What to watch for
The execution price of a market order is unknown when you submit it, and in fast or thinly traded markets it can be far from the last quote. A limit order controls price instead, with the trade-off that it may not execute.