Skip to content
All library documents

How FOK and IOC Orders Handle Available Liquidity

Article Quant Q&A · Author: Ariel Silahian

Summary

The document explains how Fill-or-Kill (FOK) and Immediate-or-Cancel (IOC) limit orders behave when available book liquidity is sufficient or insufficient for the requested quantity. In its example, a buy order for 10 units at a limit price with 15 units available at that price can be fully filled under either instruction. If the requested quantity is 20, the FOK order is cancelled because it cannot fill completely, while the IOC order executes the available 15 and cancels the remaining 5.

It also describes how a venue may allocate a fill across resting customer orders, using FIFO as a likely example: one incoming order can match multiple counterparties, with any unfilled resting quantity left on the book. The exchange or venue handles settlement and associated credit processes. These are general explanations from an answer, not a venue-specific rulebook; actual matching priority, order handling, and settlement procedures depend on the market and platform. The original question concerns foreign-exchange venues, but the visible example does not specify a full order-book layout.

Key ideas

  • FOK orders execute only when the full requested quantity can be filled immediately within the limit.
  • IOC orders execute available quantity immediately and cancel any remainder.
  • A single incoming order may match several resting orders, depending on venue matching rules.
  • FIFO is offered as a likely allocation method, but execution details depend on the venue.
  • The exchange or venue typically manages settlement between counterparties.

Tags

Full text
# How FOK or IOC order types are executed


# How FOK or IOC order types are executed












Ok, I know what's the difference are between them but still have some question. Let's say that the exchange's limit order book looks like this: (order depth of LOB)

Now, let's say I send a buy FOK order with lmt price $1.12 and size 10. It will be executed? or will be cancelled?

What about if I sent same order but as IOC?

Just in case, I'm targeting forex market with most common venues (Currenex, EBS, Hotspot, etc)

Thanks

## Answer by rupweb (score 2, accepted)

https://quant.stackexchange.com/a/28042

I don't understand the order book you've set up there: available size at 1.12 is 15 so your FOK (Fill Or Kill) order as defined to fill all, at size 10, will be filled not cancelled. It would be the same for the IOC (Immediate or Cancel) at 1.12 and all 10 will be filled.

If you're FOK or IOC order was for size 20 then the FOK would be cancelled and the IOC filled at 15 and the remaining 5 cancelled.

What you're really asking is how an exchange aggregates separate customer orders together and sets out which orders will be filled with which. First of all what does it matter with whom your order is filled? You're not offering credit, right? It's the exchange who handles the credit checks. Secondly, the exchange is likely to use a FIFO execution so that your 10 mio order will be filled with customer 1 at size 5 and then customer 2 at another 5 of their size 10. Then customer 2 still has an order at size 5 on the order book waiting for someone else to fill, or be cancelled.

It's up to the exchange to confirm and settle payments for the orders. On value date you will send them payment of your size 10 just like the 2 customers you executed with send payment for their size 5's. The exchange back office typically uses DvP (delivery versus payment) to match deliveries of funds then makes the payments out. So they handle credit or late delivery issues, not you...

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.