For example, on a bitcoin exchange, three coin sellers are asking for BTC/USD 2265.75, BTC/USD 2269.55, and BTC/USD 2270.00. A trader who initiates a market order to buy bitcoins will have their order filled at the best ask price of 2265.75. If only five bitcoins are available for the best ask and 10 coins are available for 2269.55, and the trader wants to buy 10 at market price, the trader’s order will be filled with 5 coins @ 2265.75 and the remaining 5 @ 2269.55.
However, a trader who thinks they can get bitcoins for a better price could set a limit order for, say, 2260.10. If a seller matches their ask price with this order or sets a price below this figure, the order will get filled. All of this is done by the exchange, which takes a percentage of each transaction for their business.