Learn about IOC, FOK, and day orders
WHAT are these orders?
The three we study here:
| Order | Full name | Lifetime | Partial fills allowed? |
|---|---|---|---|
| DAY | Day order | Until market close today | Yes (stays open for rest) |
| IOC | Immediate-Or-Cancel | Instant (this moment only) | Yes (unfilled part cancelled) |
| FOK | Fill-Or-Kill | Instant (this moment only) | No (all-or-nothing) |
WHY do these exist? (Derivation from the trader's need)
Imagine you want to buy 1000 shares of a stock. Let's derive each order type from a problem.
Problem 1 — "I want cheap shares, and I'm patient." You place a limit buy at ₹100, but the current ask is ₹101. Nobody will sell to you right now. You want the order to wait in case the price drops. → This need creates the DAY order: it rests on the order book until filled or the market closes.
Problem 2 — "Take whatever is available instantly, don't leave a trace." You're a fast trader. You want to grab shares available this instant at your price, but you do not want a leftover order sitting on the book (it could get filled later at a bad moment, or signal your intent to others). → This need creates the IOC: execute immediately for whatever quantity is available, cancel the rest instantly.
Problem 3 — "All 1000 or none — a half-fill is useless to me." Maybe you're hedging a position that requires exactly 1000 shares; a partial fill of 300 would leave you dangerously exposed. → This need creates the FOK: if all 1000 can't be filled immediately, kill the entire order, filling nothing.

HOW the exchange processes each (step-by-step)
Say the sell side of the order book has:
- 300 shares @ ₹100
- 400 shares @ ₹100
- (total 700 available at ₹100 or better)
You send BUY 1000 @ ₹100. Here's how each TIF behaves:
A tiny "formula" for filled quantity
Related cousins (so you have the full family)
Recall Feynman: explain to a 12-year-old
Imagine buying 10 candies at the shop.
- DAY order: "I want 10 candies at ₹5 each. If you only have 6 now, give me those 6 and I'll stand here waiting for the other 4 until the shop closes tonight."
- IOC: "Give me whatever candies you have right now at ₹5 — 6 is fine — but I'm not waiting. Keep the other 4, I'm leaving."
- FOK: "I need all 10 right now or I don't want ANY. Can't give 10? Then keep them all." The only two things you're deciding: do I wait? and do I accept getting only part?
Flashcards
What does Time-in-Force specify about an order?
What does IOC stand for and mean?
What does FOK stand for and mean?
What does a DAY order do with an unfilled portion?
Key difference between IOC and FOK?
Do IOC and FOK ever rest on the order book?
If you BUY 1000 but only 700 are available, how many fill under IOC?
If you BUY 1000 but only 700 are available, how many fill under FOK?
If you BUY 1000 but only 700 are available, how many fill under DAY?
Does a DAY limit order guarantee execution?
Formula for FOK filled quantity F?
Which TIF is the default on most exchanges?
Name two "resting" TIF types besides DAY.
Connections
- Limit Orders vs Market Orders — TIF is the fourth setting beyond side/qty/price.
- Order Book & Market Depth — determines the "available quantity A" that IOC/FOK match against.
- GTC and GTD Orders — the multi-day "resting" cousins of DAY.
- Slippage and Partial Fills — why IOC's partial-fill behaviour matters.
- Algorithmic Trading — IOC/FOK are heavily used by fast/automated strategies.
- Hedging Basics — motivates FOK's all-or-nothing requirement.
Concept Map
Hinglish (regional understanding)
Intuition Hinglish mein samjho
Dekho, jab tum koi order exchange ko bhejte ho, toh sirf buy/sell, quantity aur price hi nahi batate — ek chhupa hua setting bhi hota hai: Time-in-Force, matlab "yeh order kitni der zinda rahega?" Yahin se IOC, FOK aur DAY ka farak aata hai.
DAY order kehta hai: "Jitna abhi mil raha hai le lo, baaki ke liye main market close hone tak wait karunga, order book par rest karega." IOC (Immediate-Or-Cancel) kehta hai: "Abhi jo mil raha hai woh de do, bacha hua part turant cancel kar do — main wait nahi karta." FOK (Fill-Or-Kill) sabse strict hai: "Ya toh poora ka poora abhi do, ya kuch mat do — half fill mujhe nahi chahiye."
Sabse common galti: log IOC aur FOK ko same samajh lete hain kyunki dono instant hote hain. Farak yeh hai — IOC partial fill accept karta hai (1000 me se 700 chalega), lekin FOK all-or-nothing hai (700 mila toh 0 fill karega!). Ek line me yaad rakho: IOC = jo mile le lo; FOK = sab ya kuch nahi.
Yeh matter kyun karta hai? Agar tum hedging kar rahe ho aur tumhe exactly 1000 shares chahiye, toh adha fill tumhe zyada risky bana sakta hai — isliye FOK. Agar tum fast trader ho aur koi trace order book par nahi chhodna chahte, toh IOC. Aur agar tum patient ho aur achhi price ka wait kar sakte ho, toh simple DAY order. Formula: DAY aur IOC dono fill karte hain, bas leftover ka treatment alag hai; FOK ek step-function hai — hua toh poora, warna zero.