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

# Order Entry

> Supported Order Types and Times in Force

## Order Types

### Market Orders

* Execute immediately at the best available price.
* Provide **certainty of execution** but not certainty of price.
* Cannot include **Good-Till-Cancelled (GTC)** instructions.

### Limit Orders

* Specify both **quantity** and **price limit** (max for buy, min for sell).
* If not filled immediately, rest in the order book at the specified price.

### Add Liquidity Only (ALO) Orders

* Execute **only if they add liquidity**.
* If an ALO order would immediately match with an existing order, it is **cancelled** instead.

Any of the above types can optionally specify a `take_profit` and `stop_loss` price.
This stages *Stop Order(s)* at the exchange:

### Stop Orders

* Must be either `take_profit` or `stop_loss`.
* Convert to a Market Order when the Mark Price reaches the specified price.
* Act only to decrease position at the time of execution; otherwise, the order could be rejected, or other stop orders cancelled.

## Reduce-only orders

A reduce-only order can close or decrease an existing position, but cannot increase it or open a position in the opposite direction. Execution is limited by your position at the time of the match. An order can therefore be partially filled and have its remainder cancelled, or be cancelled without a fill if it no longer reduces your position.

QFEX can also automatically convert resting orders to reduce-only during soft liquidation, even if you submitted them as ordinary orders. See [order margin release and soft liquidation](https://docs.qfex.com/qfex/liquidation-margin-call.md#order-margin-release-and-soft-liquidation) for the sequence of events, what appears on the website and what API clients receive.

## Time In Force

### Fill-or-Kill (FOK)

* Must execute **entirely and immediately**, or be cancelled.
* Suitable for **large block trades** or hedging strategies.

### Immediate-or-Cancel (IOC)

* Executes any **immediately available portion**, cancelling the rest.
* Reduces risk of resting orders in volatile markets.

### Good-Till-Cancelled (GTC)

* Remains active until executed or manually cancelled.
* Applies only to **limit** and **ALO** orders (not market orders).
* Persists across sessions.

### Instruction Availability Table

| Order Type | FOK | IOC | GTC |
| - | - | - | - |
| **Market Orders** | ❌ | ✅ | ❌ |
| **Limit Orders** | ✅ | ✅ | ✅ |
| **ALO Orders** | ❌ | ❌ | ✅ |
| **Stop Orders** | ❌ | ✅ | ❌ |


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