IOC and FOK orders: what happens to the remainder that finds no counterparty
· 5 min · beginner
Automated material · TradeAlmanac editorial deskDraft prepared by a language model from our stored data; not reviewed by an editor.
IOC and FOK are not separate price types but time-in-force conditions on an order. An IOC order ("immediate or cancel") is executed for whatever volume is available in the order book at that moment, and the unfilled remainder is cancelled at once. A FOK order ("fill or kill") must be executed in full and instantly: if there is not enough opposing volume at your price, the order is not executed at all and leaves no trace in the order book. The only difference between the two is whether a partial fill is allowed.
What sets the price in these orders, and what sets the time
Every order is described by independent properties: price and duration. The price is set by the order type: a market order takes whatever is there, while a limit order sets a boundary beyond which you will not trade. The duration is set by a separate parameter: "until the end of the session", "good till cancelled", "immediate". IOC and FOK belong to the second property. That is why it is correct to speak of "a limit order with an IOC condition": it has a price, and it also carries a ban on waiting. If this distinction is not clearly sorted out, choosing an order becomes guesswork; the basic pair is covered in the article on market and limit orders.
IOC: takes whatever liquidity is there
An order with an IOC condition sweeps down the order book (up, when buying) as far as your limit and takes all the available opposing volume. Whatever is not covered is cancelled instantly. In the trade log you will see either a partial fill or a rejection with no trades.
The practical point is that the order leaves no resting remainder. An ordinary limit order that is partially filled stays in the queue, and that remainder is visible to the market, keeps its time priority and may be filled later at a price that by then no longer suits you. IOC removes that possibility: either now or never.
FOK: either in full, or as if it never happened
FOK adds a completeness requirement. The system checks whether the entire stated volume can be filled at the specified price at the moment the order arrives. If it cannot, the order is rejected without touching a single opposing order. This is a testing mechanism rather than a trading one: you ask the order book whether it holds the depth you need, and you get the answer at the cost of zero risk of ending up with a partial position.
Exactly the same logic underlies the condition known in Russian terminology as the all-or-none order, with the caveat that "all or none" in some implementations allows the order to wait, whereas FOK demands execution right now. This distinction is examined in more detail in the glossary entry on the all-or-none condition.
When a partial fill is a problem
A partial position gets in the way wherever the purpose of the trade depends on its integrity.
- Pair trades and arbitrage: one leg is filled, the opposite one is not, and instead of a neutral structure you hold a directional risk you never wanted.
- Closing a position to meet a margin call: any remaining volume means the requirement has not been met.
- A trade where entry costs are fixed rather than proportional to volume.
In these cases FOK is not caution but a condition of correctness. When building up a large position, by contrast, partial fills are the normal mode of operation, and IOC is the appropriate choice, or other tools altogether: an iceberg order, which shows the market only a slice of the volume, or a TWAP algorithm, which slices the volume over time.
How it looks from the order book's side
The cancelled remainder of an IOC order and a rejected FOK order do not linger in the order book, and by that feature they are not to be confused with orders that are placed in order to be pulled. "Appeared and vanished" behaviour is not in itself manipulation: the difference is that an IOC order is removed by a rule rather than by the participant's hand, and before it is removed it manages to take liquidity. The line between technical cancellation and imitating interest is examined in the article on spoofing.
A checklist before your first such order
- Step 1: make sure your terminal treats order type and duration as separate fields rather than hiding them in a single list.
- Step 2: look at the order book depth for the security you are interested in; the available opposing volume is shown on the instrument page, for example SBER and other securities in the Russian equities section.
- Step 3: send a FOK order for a volume the order book is certain to cover, and check how the broker's report would display a rejection had it not been covered.
A FOK rejection is information, not an error. An order that was not executed has told you that the market does not hold the depth you need at your price, and it did not make you pay for that knowledge with an open position. Related conditions and stop-order structures are collected in the site glossary.
Related instruments
Draft prepared by a language model from our stored data; not reviewed by an editor.
Model: claude-opus-5
How we use language modelsSimilar articles
- Token vs coin: whose network keeps the ledger and who is responsible for the issueA coin is a blockchain's own native asset, the one that blockchain serves: the reward for maintaining the network is counted in it, and the fee for a transfer is paid in it too.
- Proof of work: what the miner pays for and what the network buys with that moneyProof of work is the rule by which a network with no central authority decides which version of the transaction history counts as the real one: the right to append the next block goes to whoever presents the result of a deliberately expensive computation.
- Mining as a Regulated Activity: the Registry, Eligibility and the Role of the Pool OperatorMining in Russia is no longer a legally nameless pursuit: the 2024 amendments to the legislation on digital financial assets defined it as a distinct type of activity, restricted who may engage in it and tied eligibility to inclusion in a state registry.
- Crypto exchange vs OTC trade: who holds the asset until settlementThe difference between a crypto exchange and an over-the-counter trade comes down to whom you hand your asset to, and for how long.