Why your Immediate or Cancel (IOC) order was only partially filled
An Immediate or Cancel (IOC) order was only partially filled because there were not enough shares available at your price for immediate execution. The order bought all available shares instantly and cancelled the rest, which is exactly how it is designed to work.
What is an Immediate or Cancel (IOC) Order?
An Immediate or Cancel (IOC) order is a specific instruction you give your broker. It tells them to execute all or part of your trade immediately. Any part of the order that cannot be filled instantly is automatically cancelled. There is no waiting around. The entire process happens in a fraction of a second.
Think of it as having two commands built into one:
- Immediate: You are telling the system, "I want to buy or sell these shares right now, at this price or better." The exchange looks for matching orders that are currently available.
- Cancel: This part says, "If you cannot find enough shares to complete my entire order right now, that's okay. Just give me what you can and cancel the rest of the order."
This type of order is popular among active traders who want to seize a price opportunity without having an open order linger on the books. They want execution now or not at all.
Why IOC is a Feature, Not a Bug
A partial fill feels like a mistake, but it's the IOC order doing its job perfectly. It protected you. It ensured you got the shares that were available at your price without committing you to waiting for the rest. If the price had suddenly moved against you, your unfulfilled portion would be safely cancelled, not waiting to be filled at a worse price. Understanding this is key to using different stock nifty-and-sensex/avoid-slippage-nifty-futures-orders">market order types effectively.
Why Your IOC Order Was Partially Filled: Liquidity is King
The single biggest reason your IOC order was only partially filled is nse-and-bse/price-discovery-differ-nse-bse">liquidity. Liquidity simply means how many buyers and sellers are present for a stock at any given moment. High liquidity means many participants and lots of shares changing hands. Low liquidity means the opposite.
Imagine you want to buy 500 shares of company XYZ at a ma-buy-or-wait">stop-loss-stop-limit-order-use">limit price of 100 per share. You place an IOC order. The system looks at the intraday">order book, which shows what other people are willing to sell. This is called market depth.
The market depth might look something like this:
| Sellers (Ask Price) | Quantity Available |
|---|---|
| 100.00 | 250 shares |
| 100.05 | 800 shares |
| 100.10 | 1,500 shares |
When your IOC order for 500 shares hits the market, the system sees there are only 250 shares available at your price of 100. It immediately buys those 250 shares for you. Because your order was "Immediate or Cancel," the system then cancels the remaining, unfulfilled part of your order (for the other 250 shares). You get a notification: "Partially Executed." The system did exactly what you asked. It filled what was immediately possible and cancelled the rest.
Comparing IOC with Other Stock Market Order Types
To truly grasp the power of an IOC order, you must compare it to other common order types. Choosing the right one depends entirely on your goal.
IOC vs. Day Order
A Day Order is the default for most brokers. It remains active until the end of the trading day. If you placed a Day order for 500 shares at 100, it would buy the first 250 shares. Then, it would wait. If another seller comes along later in the day offering shares at 100, your order would try to buy them. A Day order keeps trying until it is fully filled, you cancel it, or the market closes.
IOC vs. Fill or Kill (FOK)
A Fill or Kill (FOK) order is the stricter cousin of IOC. An FOK order demands the entire order be filled immediately. If not, the whole order is cancelled. In our example above, an FOK order for 500 shares would have been cancelled completely because only 250 shares were available. You would have ended up with zero shares. FOK is for traders who need an "all or nothing" execution.
IOC vs. Good 'Til Canceled (GTC)
A Good 'Til Canceled (GTC) order is a long-term order. It stays active for days or even weeks until it is completely filled or you manually cancel it. It is the opposite of an IOC order's urgency. GTC is for patient investors who are willing to wait for their price, no matter how long it takes.
Here's a simple comparison: IOC is a sprint, a Day Order is a day-long marathon, and a GTC is an ongoing journey.
What Should You Do After a Partial Fill?
You placed your IOC order and it was partially filled. You now own some shares, but not as many as you wanted. What's next? You have a few options.
- Place a New Order: You can immediately place a new order for the remaining quantity. If you wanted 500 shares and got 250, you can place a new order for the other 250. Be warned: the price may have changed in the few seconds it took you to react. You might have to pay a slightly higher price now.
- Re-evaluate the Trade: A partial fill can be a useful signal. It tells you that liquidity at your price is thin. Perhaps this is a good moment to pause. Ask yourself if you still want to build a larger position in a stock that is hard to trade. Is the price moving against you?
- Accept the Smaller Position: Sometimes, getting part of what you want is good enough. You can simply accept the smaller number of shares and move on. This avoids chasing the stock and potentially paying more.
How to Prevent Unwanted Partial Fills
If your strategy requires a specific number of shares, you can take steps to avoid the partial fill scenario.
- Use a Fill or Kill (FOK) Order: If you absolutely must have the full quantity or nothing at all, the FOK order type is the perfect tool for the job.
- Check Market Depth First: Before you place a large trade, look at the Level 2 order book data on your mcx-and-commodity-trading/mcx-trading-apps-desktop-software-better">trading platform. This shows you exactly how many shares are being offered at various prices. If you see there aren't enough shares to fill your order, you can adjust your plan accordingly.
- Use a Regular Day Order: If you aren't in a massive hurry, a standard Day order might be better. It will wait patiently throughout the day to find enough sellers at your desired price, increasing the chance of a full execution.
A partial fill on an IOC order isn't a trading error; it's a sign that you're using an advanced tool. By understanding how it works and what it tells you about the market, you can make smarter decisions. Knowing your stock market order types is a fundamental skill that separates novice traders from experienced ones. Choose the right order for your goal, and you will always be in control of your trades.
Frequently Asked Questions
- What's the main difference between an IOC order and a Day order?
- An IOC (Immediate or Cancel) order must be executed instantly, and any portion that can't be filled is immediately cancelled. A Day order remains active for the entire trading day, trying to get fully filled until the market closes.
- Why would a trader use an IOC order instead of a normal one?
- Traders use IOC orders to seize a specific price without the risk of the order lingering. It's for situations where speed is critical and they want to avoid having their order filled at a worse price if the market moves suddenly.
- If my IOC order is partially filled, do I pay the full brokerage fee?
- This depends on your broker's policy. Many brokers charge a brokerage fee on the executed value of the trade, not the intended value. So, for a partial fill, you would typically only pay brokerage on the shares that were actually bought or sold.
- Can a market IOC order be partially filled?
- Yes, even a market IOC order can be partially filled, although it's less common. This can happen in extremely fast-moving or illiquid markets where the available quantity disappears between the time the order is placed and when it reaches the exchange.
- What is the difference between a Fill or Kill (FOK) and an IOC order?
- The key difference is that an IOC order allows for partial fills, while an FOK order does not. An FOK order must be filled in its entirety immediately, or the entire order is cancelled. An IOC order will take whatever it can get immediately and cancel the rest.