What Are GTC, FOK and IOC Orders? (Time in Force Explained)
GTC (Good Till Canceled), FOK (Fill or Kill) and IOC (Immediate or Cancel) are Time in Force settings for limit orders. Each setting tells the system what to do with the part of a limit order that is not filled immediately: keep it on the order book, cancel the whole order, or fill what is available and cancel the rest.
What is Time in Force?
Time in Force (TIF) defines how a limit order is handled if it is not immediately and fully filled. In Perpetual Contract trading (contracts with no expiry date), you can choose GTC, FOK or IOC alongside the order price and quantity. These settings apply to limit orders. Market orders do not use a Time in Force setting because they execute at the best available price as quickly as possible.
GTC: Good Till Canceled
GTC means the order stays active until it is filled or cancelled.
- After you submit a GTC order, any unfilled portion stays on the order book until it is fully filled, you cancel it, or the system cancels it under platform rules.
- GTC is the most common default Time in Force setting for limit orders.
Example: XAUUSD is at 3,300 USD. You submit a buy limit order with these settings:
- Limit Price: 3,280 USD
- Quantity: 10 XAU
- Time in Force: GTC
If the market has not reached 3,280 USD, the order stays on the order book. If the price falls to 3,280 USD and there are enough matching orders, the order may fill. If you no longer want to wait, you can cancel the order manually.
When to use GTC: Use GTC when you want a specific price and are willing to wait for the market to reach it, for example when you want to enter a position only after a pullback to a target level.
FOK: Fill or Kill
FOK means the order must be filled in full immediately, or the whole order is cancelled.
- When you submit an FOK order, the system checks whether the full quantity can be filled immediately at your price or better.
- If it can, the order fills in full.
- If it cannot, the order is cancelled at once. Partial fills are not allowed, and the order does not stay on the order book.
Example: XAUUSD is at 3,300 USD. You submit a buy limit order:
- Limit Price: 3,305 USD
- Quantity: 10 XAU
- Time in Force: FOK
If the order book has enough volume at 3,305 USD or better to fill all 10 XAU, the order fills in full. If only 6 XAU are available at that price, the order is cancelled in full. It does not fill the 6 XAU.
When to use FOK: Use FOK when you need the entire order filled at once and do not want a partial fill or a resting order.
IOC: Immediate or Cancel
IOC means the system fills whatever is available immediately and cancels the rest.
- When you submit an IOC order, the system tries to match it immediately at your price.
- Any portion that can be filled right away executes. The unfilled portion is cancelled.
- IOC allows partial fills, but the unfilled portion never stays on the order book.
Example: XAUUSD is at 3,300 USD. You submit a buy limit order:
- Limit Price: 3,305 USD
- Quantity: 10 XAU
- Time in Force: IOC
If 6 XAU are available at 3,305 USD or better, 6 XAU fill immediately and the remaining 4 XAU are cancelled. If no volume is available at that price, the entire order is cancelled.
When to use IOC: Use IOC when you want to fill as much of the order as possible right away and do not want any unfilled part left on the order book.
Comparison of GTC, FOK and IOC
| Time in Force | Partial fill allowed? | Can stay on the order book? | What happens to the unfilled portion | Typical use |
| GTC (Good Till Canceled) | Yes | Yes | Stays on the order book until filled or canceled | Wait for a specific price |
| FOK (Fill or Kill) | No | No | The entire order is canceled if it cannot be fully filled | Fill the full amount at once or not at all |
| IOC (Immediate or Cancel) | Yes | No | Filled portion executes; the rest is canceled | Fill what is available now, with no resting order |
The key difference is how the unfilled portion is handled. GTC allows a resting order. FOK allows no partial fill and no resting order. IOC allows a partial fill but no resting order.
Points to note
- GTC, FOK and IOC are typically used with limit orders.
- GTC orders can stay on the order book for a long time, so check your open orders regularly.
- FOK orders must fill in full immediately, or they are cancelled completely.
- IOC orders can partly fill, but the unfilled portion is cancelled straight away.
- FOK and IOC depend heavily on order book depth. If liquidity is thin, an IOC order may fill less than you expect, and an FOK order may be cancelled completely.
- Before using FOK or IOC, confirm that your price and quantity are reasonable.
Frequently asked questions
Does a GTC order stay active indefinitely? A GTC order stays active until it is filled, cancelled by you, or cancelled by the system. The system can also cancel GTC orders during contract suspension, position liquidation, system maintenance, risk control actions, price limit breaches, or other exceptional circumstances.
Why was my FOK order cancelled immediately? An FOK order needs complete, immediate execution. If the order book does not have enough volume at your price or better to fill the whole order, the system cancels it at once. For example, if you submit an FOK buy order for 10 XAU and only 6 XAU are available, the entire order is cancelled.
Why was my IOC order only partly filled? IOC orders allow partial fills. The system fills what is available right away and cancels the rest. For example, if you submit an IOC buy order for 10 XAU and only 6 XAU are available, 6 XAU fill and the remaining 4 XAU are cancelled.
What is the difference between FOK and IOC? FOK requires the entire order to fill immediately, or the whole order is cancelled. IOC fills whatever is available immediately and cancels the rest. In short, FOK is “all or nothing,” and IOC is “fill what you can now, cancel the rest.”
What is the difference between GTC and IOC? A GTC order keeps its unfilled portion on the order book until it fills or is cancelled. An IOC order cancels its unfilled portion immediately. Choose GTC if you are willing to wait for your price. Choose IOC if you want only what is available now and do not want a resting order.
Do GTC, FOK and IOC change the execution price? No. They control how the order is handled after submission. They do not change your limit price. The actual execution price still depends on your limit price, the market price, order book depth and matching conditions. Buy orders typically fill at or below the limit price, and sell orders at or above it.
Can market orders use GTC, FOK or IOC? No. GTC, FOK and IOC apply to limit orders. Market orders are designed to execute at the best available price as quickly as possible and do not require a Time in Force setting.