Immediate or Cancel Order: How IOC Orders Work in Trading

Immediate or Cancel Order: How IOC Orders Work in Trading — Finelo Blog

Learn what an immediate or cancel (IOC) order is, how it differs from FOK and GTC orders, and when traders use it. Includes examples and a decision framework.

7 min read

Practice trading with Finelo

Practice in a simulator, learn with bite-sized lessons, and build confidence before risking real money.

Explore Finelo

An immediate or cancel order is an instruction to buy or sell a security right away, filling as many shares as the market can provide at that moment. Whatever cannot be filled immediately is automatically canceled. Nothing stays open on the order book, which is the defining feature of an IOC order.

Explore Finelo's 28-day challenges

Turn learning into a daily habit with guided challenge paths.

View challenges

This page is for investors and active traders who already know the basics of market and limit orders and want to control how long an order stays alive. If that is you, read the mechanics, compare IOC with the other time-in-force options in the table below, then check whether your broker supports IOC before you need it. This article is educational, not financial advice.

What an immediate or cancel order is

Every order you send to a broker carries two decisions: the price terms (market or limit) and the time terms, known as time in force. The immediate or cancel instruction is a time-in-force option. The SEC's investor glossary defines an IOC order as one that must be executed immediately, with any unfilled portion canceled rather than left working.

An IOC order accepts partial fills and never stays open on the order book. Whatever doesn't execute immediately is canceled automatically.
An IOC order accepts partial fills and never stays open on the order book. Whatever doesn't execute immediately is canceled automatically.

Two things make IOC distinct. First, it accepts partial fills: if only some shares are available, you get those shares. Second, it never lingers. There is no open order sitting in the market that could execute minutes or hours later at a price you no longer want.

How an IOC order works step by step

The lifecycle is short by design:

  1. You submit the order, usually as an IOC limit order with a price cap or floor.
  2. The exchange or trading venue matches it against available shares at your price or better.
  3. Any filled portion executes instantly.
  4. The unfilled remainder is canceled automatically, with no further action from you.

Here is a worked example. Say you place an IOC limit order to buy 1,000 shares at $50.00, and only 600 shares are offered at $50.00 or less at that instant. You buy the 600 shares. The remaining 400 shares are canceled immediately instead of waiting on the book. Your account now shows a 600-share position and no open orders.

When you place an IOC limit order for 1,000 shares at $50.00 and only 600 are available, you receive those 600 immediately and the remaining 400 are canceled. No open order remains.
When you place an IOC limit order for 1,000 shares at $50.00 and only 600 are available, you receive those 600 immediately and the remaining 400 are canceled. No open order remains.

Compare that with a plain day limit order for the same 1,000 shares: the leftover 400 would sit open for the rest of the session and could fill later, possibly after news has changed your view of the stock.

Unlike a day limit order, which leaves unfilled shares working on the order book for hours, an IOC order cancels the remainder instantly. This
Unlike a day limit order, which leaves unfilled shares working on the order book for hours, an IOC order cancels the remainder instantly. This

IOC vs FOK, GTC, and other time-in-force options

FINRA's guide to time parameters groups the common time-in-force choices. The table below compresses the differences:

Time in force Partial fills allowed? How long it stays active
Immediate or cancel (IOC) Yes Instant only; remainder canceled
Fill or kill (FOK) No; all shares or nothing Instant only
Day order Yes Until the close of the trading day
Good 'til canceled (GTC) Yes Until filled, canceled, or broker's time limit
All or none (AON) No Keeps trying until canceled or expired
Market on close (MOC) Yes Executes at the closing auction

The IOC vs FOK distinction matters most. Both demand immediate execution, but FOK cancels the entire order if it cannot fill completely, while IOC takes whatever is available. Per FINRA's descriptions, IOC behaves like "take what you can get now," while FOK is all or nothing. GTC sits at the other extreme: your broker keeps working the order, sometimes for months, until it fills or you cancel it.

IOC and FOK both demand immediate execution, but IOC accepts whatever fills right now while FOK requires complete execution or cancels everything. GTC stays open until filled or manually canceled.
IOC and FOK both demand immediate execution, but IOC accepts whatever fills right now while FOK requires complete execution or cancels everything. GTC stays open until filled or manually canceled.

When traders use IOC orders

IOC fits situations where leftover open orders create more risk than missed shares:

  • Fast-moving markets. When prices are changing quickly, a resting order can fill at a moment you did not choose. IOC removes that exposure by living for only an instant.
  • Large orders in liquid stocks. A trader working a big position can send repeated IOC slices, capturing the liquidity available at each price level without signaling a large resting order to the market.
  • Pairing trades. If a stock purchase only makes sense alongside another position, such as an options trade, an IOC order avoids ending up with a stale fill after the window has passed.
  • Avoiding order-management overhead. Anything unfilled cancels itself, so there is nothing to remember to cancel at the end of the day.

A realistic scenario: a stock you follow drops sharply on an earnings headline. You want up to 500 shares, but only at $42.00 or better, and only right now, while the dislocation lasts. An IOC limit order at $42.00 buys whatever is available at that price this second and cancels the rest, sparing you an open order that might fill after the price recovers.

In a fast-moving market event, an IOC limit order at $42.00 captures available shares at that price instantly while avoiding the risk of a stale fill after the opportunity passes.
In a fast-moving market event, an IOC limit order at $42.00 captures available shares at that price instantly while avoiding the risk of a stale fill after the opportunity passes.

Practice trading with Finelo

Practice in a simulator, learn with bite-sized lessons, and build confidence before risking real money.

Explore Finelo

Limitations and risks

The same instant-only behavior that protects you also has costs:

  • You may get nothing. In a thinly traded stock, there may be few or no shares at your limit price at that instant, so most of the order cancels. IOC works best where quotes are deep.
  • Many small fills. Repeated IOC orders can produce a series of partial executions. Depending on your broker's commission structure, that can matter; check how partial fills are charged.
  • Not always available. Some platforms reserve IOC and other advanced time-in-force options for active-trader tiers, and availability can differ between stocks, options, and other products.
  • No second chances. If the price touches your limit a minute later, your order is already gone. Traders who want to keep standing interest at a price are better served by day or GTC limit orders.

What to know before deciding

Before sending an IOC order, confirm four things. First, that your broker actually offers IOC on the product you are trading. Second, the liquidity of the stock: check the bid-ask spread and displayed sizes, because IOC depends on shares being there right now. Third, your own intent: do you want standing interest at a price, or execution only in this moment? Fourth, how partial fills affect your plan, since ending up with 600 of 1,000 intended shares changes position sizing and any paired trade.

Decision framework: choosing a time-in-force option

Use this sequence to pick the right instruction:

  1. Must the whole order fill together? If yes, use FOK. If partial fills are acceptable, continue.
  2. Does the order only make sense right now? If yes, IOC. If it can wait, continue.
  3. Is your price target likely to be reached today? If yes, a day limit order is the simplest choice.
  4. Are you willing to wait days or weeks for your price? Use GTC, and set a review reminder so it does not fill after your thesis has changed.
  5. Do you specifically want the closing price? Use MOC, noting that exchanges generally require these orders shortly before the close.

A common mistake is defaulting to GTC for everything and forgetting the orders exist. Another is using IOC in an illiquid stock and concluding the order type "does not work" when the real issue was missing liquidity.

Conclusion and next steps

An immediate or cancel order trades certainty of timing for certainty of execution: you get whatever the market offers in the moment, and nothing hangs around afterward. It suits fast conditions, liquid stocks, and traders who dislike managing open orders, while day and GTC limit orders remain better for patient price targets.

Next steps: open your broker's order ticket and find the time-in-force menu, practice reading displayed bid and ask sizes before sending an IOC order, and paper trade a few partial-fill scenarios first. If you want structured practice with order types and trading mechanics, the Finelo app teaches these concepts step by step for beginners.

Frequently asked questions

What happens to the unfilled part of an immediate or cancel order?

It is canceled automatically the moment the matching attempt ends. You keep any shares that filled, and nothing remains open on the order book. Your broker's order status will typically show a partial fill plus a cancellation.

How is IOC different from fill or kill?

Both execute immediately or not at all in terms of timing. The difference is completeness: IOC accepts partial fills and cancels the rest, while FOK cancels the entire order unless every share can fill at once.

Can I use a limit price with an IOC order?

Yes. In practice most IOC orders are limit orders, which caps the price you pay or floors the price you receive. An IOC market order executes against whatever prices are immediately available, which can be risky in volatile names.

Do IOC orders guarantee execution?

No. They guarantee that nothing stays open, not that anything fills. If no shares are available at your price at that instant, the whole order cancels and you simply do not trade.
immediatecancelorderiocorderstrading

Practice trading with Finelo

Practice in a simulator, learn with bite-sized lessons, and build confidence before risking real money.

Explore Finelo

About the author

Finelo Team

The Finelo Team creates practical investing and trading education designed to help beginners learn faster with structured challenges, simulator practice, and bite-sized lessons.

Keep reading — Related articles