Definition
Fill or kill (FOK) is an execution condition that requires the whole order to be filled at once at the requested price or better, or else the order is cancelled. Immediate or cancel (IOC) fills whatever part of the order can be filled at once and cancels the rest.
Both are "time in force" or "filling" conditions. They tell the trading system what to do when there is not enough volume (liquidity) available at your price at the moment the order arrives.
Ready to try it on a real or demo account?
Partner link · trading carries a high risk of loss
Formal definition and edge cases
- FOK is all-or-nothing and immediate. If the full volume cannot be matched right away, nothing is executed and no partial position is opened.
- IOC is immediate but allows a partial fill. The filled part stays open, and the unfilled part is cancelled. It is never left waiting in the order book.
- Neither condition keeps an order resting. This is the opposite of a day order or a good-till-cancelled order, which wait for a fill.
- With IOC, the filled volume may be very small. The resulting position may not match the size you planned.
- FOK protects you from an unwanted partial position, but in a thin or fast market it may be rejected again and again.
- With a dealer or market maker as the counterparty, the result depends on the volume that party quotes, not on a public exchange book.
Worked example (hypothetical)
A trader sends a buy order at a limit price. At that moment, sellers are offering only part of the requested size at that price or better.
| Condition | What happens |
|---|---|
| FOK | Nothing is filled. The whole order is cancelled. The trader has no position. |
| IOC | The available part is bought at once. The remainder is cancelled. The trader holds a smaller position than requested. |
| No such condition (resting limit order) | The available part fills, and the rest waits in the book until it fills, expires or is cancelled. |
The trader's margin and risk now depend on the volume that was actually filled. Check that volume before setting a stop-loss. Leveraged forex and CFD trading can lose money fast, and an unexpected position size is one way losses grow. See risk management.
Where you see the terms
- MetaTrader 5. The order window and the symbol specification may show a filling type such as "Fill or Kill", "Immediate or Cancel" or "Return". Which types are allowed depends on the symbol and how the broker sets it up. See MetaTrader 5. On Exness accounts, check the symbol specification in the terminal or the official site for the current setting.
- Trade reports and account history. A cancelled FOK order, or a partly filled IOC order, appears with its filled and cancelled volume. See account statement.
- Exchange rules and news. Exchange rulebooks list FOK and IOC among the allowed order types. News about a flash crash or a fat finger error sometimes mentions how these orders behaved when liquidity disappeared.
Related terms
Frequent questions
What is the difference between a FOK order and an IOC order?
Both execute immediately. FOK accepts only a complete fill, while IOC accepts a partial fill and cancels the rest.
Can an IOC order stay open in the order book?
No. Any volume that is not filled at once is cancelled.
Does FOK guarantee my price?
It guarantees that you get the requested price or better if the order is filled. It does not guarantee that the order is filled at all.
Why was my order rejected with FOK?
The full volume was not available at your price at that moment. Check the symbol's allowed filling types in the platform.
Is one condition better than the other?
Neither is better in general. They control different outcomes, and the choice depends on whether a partial position is acceptable to you.
