Home › Glossary › IOC and FOK orders
GlossaryIOC and FOK orders (Immediate or Cancel and Fill or Kill)
IOC (Immediate or Cancel) fills immediately whatever is possible at the limit price and cancels the rest. FOK (Fill or Kill) only executes if the full quantity can be filled at once, otherwise it cancels everything. Neither leaves an order resting on the book.
The difference between the two
Both are limit orders with a time condition: they either execute now or disappear. What separates them is the tolerance for partial fills.
- IOC: accepts a partial fill. If only part of the quantity exists at the limit price, that part is filled and the rest is canceled.
- FOK: all or nothing. If the full quantity is not available at the limit, nothing is executed.
Compare this with a regular limit order, which stays on the order book waiting until it is filled or canceled. Details vary by exchange, so check whether the contract accepts the order type you chose. The post order book and IOC orders shows execution in practice.
Why use immediate orders
They protect you from two things: paying a price worse than your limit, and leaving a forgotten order on the book that fills later when the market is already somewhere else. They are usually charged as taker, since they execute against existing orders. See maker and taker fees.
With market orders, the risk is slippage. With IOC or FOK you trade that risk for another one: not filling the whole order.
The risk of a partial fill
In funding arbitrage both legs must be the same size. If one order fills 100% and the other only 60%, you are left with an uncovered position exposed to price changes. A partial fill is a real risk of the strategy.
Low liquidity raises the chance of a partial fill. Check the depth of the book before setting the size.
In Multi Arbitrage: Multi Arbitrage uses IOC orders, which fill what they can and cancel the rest, tracks the order book and can enter in slices.
Frequently asked questions
Are IOC and FOK market orders?
No, they have a limit price. The difference from a regular limit order is that they do not wait on the book.
Which is safer against a partial fill?
FOK, because it fills everything or nothing. On the other hand, it fails more often when liquidity is thin.
Does an IOC order pay the maker fee?
Usually not, since it executes against existing orders and is charged as taker, but check your exchange's rule.
Want a bot to do this math and place the trades for you?
Multi Arbitrage picks the coins, opens both legs at the same time and protects the trade on the exchange. API key with no withdrawal permission.
Create a free accountThis content is for information only and is not investment advice. Trading crypto derivatives involves a high risk, including the total loss of your capital. Past results do not guarantee future results, and the figures mentioned are examples. Before trading, check whether trading crypto derivatives is allowed in your country and what your tax obligations are. Assess whether the product suits your profile before investing.