How are unmarketable market orders (other side of the order book is empty) matched with incoming orders? [duplicate]
I don't have all the answers. On a illiquid stock, such situations do arise and there are specific mechanisms used by exchanges to match the order. It is generally not advisable to use market order on illiquid stock. There are lots of different variations here. I guess this comes down to specifications for individual exchanges, but I'm wondering if there's a standard here or a way to approach it from basic rules that clears up all these situations. There are quite a few variations and different treatments. Market order that are placed when the market is closed or just around market opening are traded at Market Open price that each exchange has a formulae to calculate. In the process Market Buy are matched to Market Sell at the Exchange calculated price. Not all order get matched and there could be spill over's. These are then matched to limit orders. Is this determined based on which sell order came first, or based on which would result in the best deal for the incoming buyer? Generally Market orders have highest priority of execution.
"In a sense, yes. There's a view in Yahoo Finance that looks like this   For this particular stock, a market order for 3000 shares (not even $4000, this is a reasonably small figure) will move the stock past $1.34, more than a 3% move.  Say, on the Ask side there are 100,000 shares, all with $10 ask. It would take a lot of orders to purchase all these shares, so for a while, the price may stay right at $10, or a bit lower if there are those willing to sell lower.  But, say that side showed $10 1000, $10.25 500, $10.50 1000. Now, the volume is so low that if I decided I wanted shares at any price, my order, a market order will actually drive the market price right up to $10.50 if I buy 2500 shares ""market"".  You see, however, even though I'm a small trader, I drove the price up. But now that the price is $10.50 when I go to sell all 2500 at $10.50, there are no bids to pay that much, so the price the next trade will occur at isn't known yet. There may be bids at $10, with asking (me) at $10.50. No trades will happen until a seller takes the $10 bid or other buyers and sellers come in." I can't say I know everything about the underlying details, but from what I understand, your limit buy adds to the bid side of open orders, and one possibility is that someone placed a market order to sell when the bid price for the stock fell to $10 which was matched to your open limit order. So using your terminology, I would say the spot bid price is what fell to $10, even if for a brief moment. Whether or not it is possible for your order to be filled when the limit buy price is deeper than the current bid price is beyond me. It may have something to do with lot sizes. "When you place a limit sell order of $10.00 (for a stock on an option) you are adding your order to the book.  Anyone who places a buy at-the-market or with a limit price over $10.00 will have that order immediately fulfilled through the offer you have placed on the book. On the other hand, if that other person places a buy for $8.00, then the spread will now be ""$8.00 bid, $10.00 ask"". Priority is based on first the price (all $9.99 asks will clear before $10.00) and within each bucket this is based on the time your order was submitted. This is why in bidding markets (including eBay) buying at $x.01 is way better than $x.00 and selling at $x.99 is better than $(x+1).00. Source: https://en.wikipedia.org/wiki/Order_(exchange) under ""first-come-first-served""" "Yes there is, it is called a One-Cancels-the-Other Order (OCO). Investopedia defines a OCO order as: Definition of 'One-Cancels-the-Other Order - OCO' A pair of orders stipulating that if one order is executed, then the   other order is automatically canceled. A one-cancels-the-other order   (OCO) combines a stop order with a limit order on an automated trading   platform. When either the stop or limit level is reached and the order   executed, the other order will be automatically canceled. Seasoned   traders use OCO orders to mitigate risk. I use CMC Markets in Australia, and they allow free conditional and OCO orders either when initially placing a buy order or after already buying a stock. See the Place New Order box below:  Once you have selected a stock to buy, the number of shares you want to buy and at what price you can place up to 3 conditional orders. The first condition is a ""Place order if..."" conditional order. Here you can place a condition that your buy order will only be placed onto the market if that condition is met first.  Say the stock last traded at $9.80 and you only want to place your order the next day if the stock price moves above the current resistance at $10.00. So you would Place order if Price is at or above $10.00. So if the next day the price moves up to $10 or above your order will be placed onto the market. The next two conditional orders form part of the OCO Orders. The second condition is a ""Stop loss"" conditional order. Here you place the price you want to sell at if the price drops to or past your stop loss price. It will only be placed on to the market if your buy order gets traded. So if you wanted to place your stop loss at $9.00, you would type in 9.00 in the box after ""If at or below ?"" and select if you want a limit or market order. The third condition is a ""Take profit"" conditional order. This allows you to take profits if the stock reaches a certain price. Say you wanted to take profits at 30%, that is if the price reached $13.00. So you would type in 13.00 in the box after ""If at or above ?"" and again select if you want a limit or market order. Once you have bought the stock if the stop order gets triggered then the take profit order gets cancelled automatically. If on the other hand the take profit order gets triggered then the stop loss order gets cancelled automatically. These OCO conditional orders can be placed either at the time you enter your buy order or after you have already bought the stock, and they can be edited or deleted at any time. The broker you use may have a different process for entering conditional and OCO orders such as these." This question is impossible answer for all markets but there are 2 more possibilities in my experience: In practice, it would not work. If you put a bid in that was really out of line, even if it got filled, the exchange would reverse it.  Other than that it really depends on what the current bid/ask spread it, and what volume its trading, as well as how the market feels. Say the current bid is 11 and you put an order in with bid 11.5, it would soak up all the orders on the market up to the volume your buying. But once your order is filled the market will be determined by what the next order's bid/ask is. It might stay where you moved it too if others feels thats a fair price. But if every other order on the market is still at 11, then the price isnt gonna move.  tl;dl unless your a market maker, you could not realistically affect the price. There are several reasons why this may happen and I will update as I get more information from you. Volumes on that stock look low (supposing that they are either in a factor between 1s and 1000s) so it could well be that there was no volume on that day. If no trades occur then open, high and low are meaningless as they are statistics based on trades that occur that day and no trades occur. Remember that there has to be volume to get a price. The stock may have been frozen by either the exchange or the company for the day. This could be for various reasons including to prevent some illegal activity. In that case no trades were made because the market for that stock was closed. Another possibility is that all trades that day were cancelled by the exchange. The exchange may cancel all trades if there is unusual, potentially fraudulent or other illegal activity on the stock. In this case the last price for that day existed but was rolled back by the exchange and never occurred. This is a rare situation. Although I can't find any holidays on that date it is possible that this is how your data provider marks market holidays. It would be valid to ignore the data in that case as being from a non-market day. I cannot tell if this is possible without knowing exchange information. There is a possibility that some data providers don't receive data for a day or that it gets corrupted. It may be worth checking another source to ensure the integrity of the data that you are receiving. Whichever reason is true, the data provider has made the close equal to the previous day's close as no price movements occurred. Strictly the closing price is the price of the last trade made for that day and so should be null (and open, high and low should be null too and not 0 otherwise the price change on day is very large!). Therefore, to keep integrity, you have a few choices: "Re: A trader when buying needs to buy at the ask price and when selling needs to sell   at the bid price. So how can a trade happen 'in between' the bid and ask? Saying the trade can happen ""in between"" the bid & ask is simplistic.  There is a time dimension to the market.  It's more accurate to say that an order can be placed ""in between"" the current best bid & ask (observed at time T=0), thus establishing a new level for one or the other of those quoted prices (observed at time T>0). If you enter a market order to buy (or sell), then yes, you'll generally be accepting the current best ask (or best bid) with your order, because that's what a market order says to do: Accept the current best market price being offered for your kind of transaction.  Of course, prices may move much faster than your observation of the price and the time it takes to process your order – you're far from being the only participant. Market orders aside, you are free to name your own price above or below the current best bid & ask, respectively. ... then one could say that you are placing an order ""in between"" the bid and ask at the time your order is placed.  However – and this is key – you are also moving one or the other of those quoted prices in the process of placing your above-bid buy order or your below-ask sell order. Then, only if somebody else in the market chooses to accept your new ask (or bid) does your intended transaction take place. And that transaction takes place at the new ask (or bid) price, not the old one that was current when you entered your order. Read more about bid & ask prices at this other question: (p.s. FWIW, I don't necessarily agree with the assertion from the article you quoted, i.e.: ""By looking for trades that take place in between the bid and ask, you can tell when a strong trend is about to come to an end.""  I would say: Maybe, perhaps, but maybe not.)"