What happens if an exchange's order book has only Market Orders If a bitcoin exchange offers Market Orders, let's suppose there are X buy orders at market price, and Y sell orders at market price  (no limit orders):

How are these matched and at what price, since there is no "lowest or highest" price currently on the order book?
This situation would not exist. True market orders (buy or sell) cannot just "hang" around. If they are not executed immediately against existing limit orders, then they should be cancelled. The case in which they would not be executed would be if there are no orders on the other side. In which case it depends on how the system handles the orders but it should either say it can't fill it and never place the order to begin with.