What is fill or kill (FOK)?

A time-in-force instruction that either executes the entire order immediately or cancels the whole thing.

Not yet verifiedHow we verify

3 min read

In this entry

A time-in-force instruction that either executes the entire order immediately or cancels the whole thing.

There is no partial fill and nothing rests on the book. Fill or kill suits a trader who needs a specific size at a specific price and gains nothing from getting half of it, such as one leg of a two-part trade that only makes sense complete. On a thin book, most fill-or-kill orders simply cancel, which is the instruction working as designed rather than a failure.

The misreading is treating a cancellation as an error. The instruction did exactly what you asked. It found insufficient size at your price and refused to give you a partial position you did not want.

How it works

A time in force instruction tells the venue how long an order may live and whether partial execution is acceptable. Fill or kill is the strictest combination of both: immediate, and all of it.

The matching engine takes your order, walks the opposing side of the order book, and checks whether the full quantity can be filled at your limit price or better. If it can, the whole thing executes at once. If it cannot, nothing executes and the order is discarded.

Compare the neighboring instructions:

How the common time-in-force instructions differ. Availability varies by exchange and is listed in each venue's order type documentation.
InstructionPartial fill allowedRests on the book
Fill or killNoNo
Immediate or cancelYesNo
Good til canceledYesYes

Because a fill-or-kill order that executes takes liquidity from the book, it pays the taker rate; see maker taker fee. One that cancels costs nothing, since no trade occurred.

Support is not universal. Some venues offer it only on certain markets or only through the interface for professional traders, and a few implement immediate or cancel and call it something similar. Check the venue's own order type documentation before relying on the behavior.

Example

Illustrative arithmetic. You submit a fill-or-kill buy for 10 units at a limit of $100. The book offers 4 units at $99.50 and 3 units at $100, which is 7 units within your price. The order cancels entirely and you buy nothing. An immediate-or-cancel order in the same book would have filled 7 units at an average of about $99.71 and canceled the remaining 3.

Why it matters when you buy

An ordinary buyer rarely needs this instruction, and using it on a thin market means repeated cancellations while the price moves away from you. If a partial fill is acceptable, a plain limit order or immediate or cancel serves better. Check whether the asset has enough depth for the size you want at the liquidity pages.

time in force — the family of instructions, limit order — the price constraint it carries, order book — what it checks against, market depth — why it cancels, taker — the fee side it pays, good til canceled — the opposite instruction.

Questions

Why did my fill-or-kill order cancel instantly?

Because the book did not hold your full quantity at your limit price or better at that instant. That is the instruction behaving correctly, not a rejection.

Is fill or kill the same as immediate or cancel?

No. Both require immediate execution, but immediate or cancel accepts a partial fill and discards the remainder, while fill or kill requires the entire quantity or nothing.

Do I pay a fee on a canceled order?

No. No trade took place, so there is nothing to charge. Venues that charge for excessive order submissions apply that separately and it rarely affects retail volumes.