1.6.4Order Types & Mechanics

Learn about IOC, FOK, and day orders

2,061 words9 min readdifficulty · medium1 backlinks

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.


Figure — Learn about IOC, FOK, and day orders

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



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?
How long the order stays active before it executes or is auto-cancelled.
What does IOC stand for and mean?
Immediate-Or-Cancel: execute whatever quantity is available instantly, cancel the unfilled remainder; partial fills allowed.
What does FOK stand for and mean?
Fill-Or-Kill: fill the entire quantity instantly or fill nothing; partial fills NOT allowed.
What does a DAY order do with an unfilled portion?
It rests on the order book and stays active until the market closes, then auto-cancels.
Key difference between IOC and FOK?
IOC allows partial fills; FOK is all-or-nothing (0 or full quantity).
Do IOC and FOK ever rest on the order book?
No — any unfilled quantity is cancelled the same instant.
If you BUY 1000 but only 700 are available, how many fill under IOC?
700 filled, 300 cancelled instantly.
If you BUY 1000 but only 700 are available, how many fill under FOK?
0 filled — FOK kills the whole order.
If you BUY 1000 but only 700 are available, how many fill under DAY?
700 filled, 300 rest on the book until close.
Does a DAY limit order guarantee execution?
No — if price never reaches your limit, it expires unfilled at close.
Formula for FOK filled quantity F?
F = Q if available A ≥ Q, else F = 0.
Which TIF is the default on most exchanges?
DAY.
Name two "resting" TIF types besides DAY.
GTC (Good-Till-Cancelled) and GTD (Good-Till-Date).

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

answers

answers

waits all day

zero wait

zero wait

partial OK, rests

partial OK, cancels rest

all-or-nothing

creates

creates

creates

avoids

Time-in-Force setting

How long may it wait?

Must it fill completely?

DAY order

Immediate-Or-Cancel

Fill-Or-Kill

Patient buyer problem

Instant grab, no trace

Exact quantity hedge

Half-fill exposure

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 min(Q,A)\min(Q, A) fill karte hain, bas leftover ka treatment alag hai; FOK ek step-function hai — AQA \ge Q hua toh poora, warna zero.

Test yourself — Order Types & Mechanics

Connections