A limit order is an order to your broker to buy or sell an number of shares at a specified price or better, within a certain time frame. So, if you are selling, the price has to be X or higher. If you are buying, the price must be X or lower.
Example: You place a limit order to purchase 100 shares in GE (General Electric), but only if the share price is 30.00 USD or lower. You set the order to be open only for the next trading day only; if it hasn’t been executed by market close tomorrow then it will be canceled automatically.
A limit order can not be executed if the price set by you cannot be met within the time frame set by you. In the example above, there must be shares in GE available for 30.00 USD or lower during the specified trading day for the order to be executed.
If you don’t want to set a time frame for your limit order, you can set it to be active until you cancel it manually.
The opposite of a limit order is a market order. A market order is executed at best available current price. The broker fee/commission for a limit order is usually higher than for a market order.
All or None limit order
A common limit order can be partially filled. In the example above, your broker might be able to obtain 75 shares in GE for your for 30.00 USD per share before the order expires.
If you don’t want to risk having your order partially filled, you do an All or None limit order. This order will only be executed if it can be completely filled. In the example above, it wouldn’t be executed if only 99 or fewer GE shares were available for the set price.
Fill or Kill (FOK)
A limit order that will be canceled unless it can be executed right away and completely is known as a fill or kill (FOK) order.
A more flexible alternative is the “immediate or cancel” order, where the broker is allowed to execute even if the order can be only partially filled right away. The part of the order that can’t be filled right away is then canceled.