An immediate-or-cancel (IOC) or a fill-or-kill (FOK) order will be canceled if it arrives at the matching engine when there is no liquidity on the opposite side of the order book at, or better than, the limit price specified. The question then becomes what causes there to be no matching liquidity when an IOC or FOK arrives at the exchange?
There are many different possible causes for this, but they can be summarized under three different immediate causes: