> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kairos.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# Time-in-Force

> GTC, IOC, FOK, and GTD — controlling how long your order lives

A limit order needs one more instruction: how long should it wait, and what should happen if only part of it can fill? That instruction is time-in-force. This chapter walks through the four you'll use, with an example of each.

## What Is Time-in-Force?

Time-in-force tells the exchange **how long your order should stay active** and **what to do if it can't fill completely**.

Think of it as instructions on a delivery package:

* "Deliver anytime" (GTC)
* "Deliver now or return it" (IOC / FAK)
* "Deliver the whole thing now or don't bother" (FOK)
* "Deliver before Friday or return it" (GTD)

![Kawaii penguins delivering packages](https://imagedelivery.net/Hias1rvxalFDFzbgXzaBJg/ebd39655-1540-4c97-3b1d-7d8d42c38c00/public)

## GTC — Good Till Cancelled

**"Keep my order open until I cancel it."**

Your order rests on the book for as long as it takes. It stays there until it gets filled or you manually cancel it. This is the most common time-in-force for limit orders.

> **You:** Buy 100 shares at **\$0.50**, GTC
>
> **Exchange:** Got it. I'll keep this open.
>
> *...3 hours later, someone sells at **\$0.50**...*
>
> **Exchange:** Filled! 100 shares at **\$0.50**

**Use when:** You're patient and want to wait for your price.

## IOC / FAK — Immediate or Cancel (Fill and Kill)

**"Fill whatever you can right now. Cancel the rest."**

IOC and FAK mean the same thing — different exchanges just use different names. The exchange tries to fill as much of your order as possible instantly. Anything left over gets cancelled — it does not rest on the book.

> **You:** Buy 100 shares at **\$0.55**, IOC
>
> **Book:** 60 shares available at **\$0.55**
>
> **Result:** 60 filled, 40 cancelled

**Use when:** You want to grab what's available without leaving an order sitting around.

## FOK — Fill or Kill

**"Fill the entire order right now, or cancel the whole thing."**

It's all or nothing. If the exchange can't fill your complete order instantly, nothing happens.

> **You:** Buy 100 at **\$0.55**, FOK — only 60 available
>
> **Result:** Entire order cancelled. No fill at all.

> **You:** Buy 100 at **\$0.55**, FOK — 150 available
>
> **Result:** 100 shares filled at **\$0.55**

**Use when:** You need the full amount or nothing — partial fills would mess up your strategy.

## GTD — Good Till Date

**"Keep my order open until a specific date/time."**

Like GTC, but with an expiration. Your order rests on the book and automatically cancels if it hasn't filled by the deadline you set.

> **You:** Buy 100 shares at **\$0.45**, GTD March 15
>
> *...March 15 arrives, no fill...*
>
> **Exchange:** Time's up. Order cancelled.

**Use when:** You want to wait for your price, but only up to a certain point — like before a market resolves or an event happens.

<Note>
  **On Kairos:** GTD takes a duration, not a date. Send
  `expiration_minutes` alongside `time_in_force: "GTD"` — minutes from now,
  between 1 and 43,200 (30 days). It is required for GTD.
</Note>

## Side-by-Side Comparison

| Type | Rests on book? | Partial fill? | Cancels when? |
| - | - | - | - |
| **GTC** | Yes | Yes (fills over time) | When you cancel it |
| **IOC / FAK** | No | Yes (takes what it can) | Immediately after attempt |
| **FOK** | No | No (all or nothing) | Immediately if can't fill all |
| **GTD** | Yes | Yes (fills over time) | At the expiration date/time |

<Note>
  **On Kairos:** these are the only accepted `time_in_force` values —
  `GTC`, `FOK`, `FAK`, `IOC`, `GTD` — and `GTC` is the default. Every venue
  accepts all five except Opinion, which is `GTC` only. An unrecognised value is
  rejected, not downgraded. See [Order Types](/guides/order-types#time-in-force).
</Note>

## How to Choose

<img src="https://mintcdn.com/kairos-c5456474/SPBoQKTD5w4THq6r/images/docs/learn/time-in-force-tree.png?fit=max&auto=format&n=SPBoQKTD5w4THq6r&q=85&s=8b58b7756fd734f3b8c8c86bece78164" alt="Decision tree for choosing a time-in-force" width="880" height="440" data-path="images/docs/learn/time-in-force-tree.png" />

**Next:** [Execution & Slippage](/learn/execution-and-slippage) — what actually happens to your order once it reaches the book.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.