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

# Time-in-force

> GTC / IOC / FOK semantics for LIMIT and MARKET orders.

## Matrix

| Order type |     `gtc`    | `ioc` | `fok` |
| ---------- | :----------: | :---: | :---: |
| `limit`    |  ✅ (default) |   ✅   |   ✅   |
| `market`   | ❌ (rejected) |   ✅   |   ✅   |

<Tip>
  `MARKET + GTC` is semantically nonsensical — the server rejects with
  `400 invalid_tif`.
</Tip>

## GTC — Good Till Cancelled

Default for `LIMIT` orders. Rests until:

* cancelled by the user,
* filled by a counterparty,
* `expiration` reached (server cleans up with `EXPIRED`),
* market resolved (cleaned up with `CANCELLED_BY_RESOLVE`).

## IOC — Immediate Or Cancel

Executes whatever is immediately available at the requested price;
the unfilled remainder is cancelled, not rested.

## FOK — Fill Or Kill

All-or-nothing. If the full quantity isn't immediately available at
the price, nothing fills and status is `CANCELLED`.

## MARKET orders

`MARKET + IOC` — sweep the book starting from the best price until
quantity is exhausted or the `price` slippage cap is hit.

`MARKET + FOK` — same as above, but all-or-nothing within the
slippage cap.

## Which to pick

| Intent                                                                    | Use            |
| ------------------------------------------------------------------------- | -------------- |
| "Rest on the book until someone trades with me"                           | `LIMIT + GTC`  |
| "Get what's available right now at this price or better; cancel the rest" | `LIMIT + IOC`  |
| "Get the full size right now or don't bother"                             | `LIMIT + FOK`  |
| "Sweep the book up to a worst price"                                      | `MARKET + IOC` |
| "Take the full size at market right now or don't bother"                  | `MARKET + FOK` |

All five combinations are reachable end-to-end via
`POST /api/orders/place` — pass `type` + `timeInForce` in the body.
Both fields are optional; defaults are `limit` + `gtc`.
