Order Matching
Order matching in most exchanges is done on the basis of price-time priority. When a new order is placed in the exchange, best buy order (highest price) is matched with the best sell order (lowest price). Price level matching will get more priority to execute the trade. If the prices quoted are the same and both the orders are the same type (buy/sell), then whoever has placed the order earlier will have the higher priority while the orders are filled. Hence order matching is based on price-time priority. Further, if time and price are same (almost impossible assuming high granularity of time and other measures that are implemented), some exchanges mandate that the larger order gets filled first. And if all the conditions are same, the orders matched are filled based on pro-rata basis i.e. the shares are split among the orders. Hence, an order may end up in one of three states; Filled, Unfilled, and Partially filled. If an order loses priority, then that order can be re-requested by changing either the quantity, price, or the account from which it is placed.
RELATED KEYWORDS