> For the complete documentation index, see [llms.txt](https://docs.hello.trade/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hello.trade/about/trading/order-types.md).

# Order Types

Understanding different order types and how they execute in the market.

Every order carries a price bound: each type below has an explicit worst-case price that is signed and margined exactly. There are no unpriced order types (market) — for immediate execution, use a crossing Limit IOC with your slippage tolerance as the limit price.

## Order Type Execution Behavior

* **Limit** — Executes at your specified price or better.
  * To trade immediately (market-style execution), place a **crossing Limit IOC**: set the limit price at your maximum acceptable slippage (e.g. buy with limit = mark × 1.01 for a 1% bound). It fills immediately up to your bound and cancels any remainder — speed of a market order, with a guaranteed worst-case price.
  * Supports an optional `reduceOnly` flag (see below).
* **Stop-Limit** — Becomes a limit order when the market reaches your stop (trigger) price. Requires both `stopPrice` and `limitPrice`.
* **Stop-Loss** — Closes (part of) your position when the market moves against you. Places as a Stop-Limit: requires a `stopPrice` (trigger) **and** a `limitPrice` (worst acceptable execution price).
* **Take-Profit** — Closes (part of) your position at a profit target: becomes a limit order when the market touches your trigger price. Requires a `stopPrice` (trigger) **and** a `limitPrice` (worst acceptable execution price).

### Reduce-Only Orders

`reduceOnly: true` marks an order that may only ever **reduce** your position — it can never open one, flip it, or grow it. Supported on **Limit, Stop-Limit, Stop-Loss and Take-Profit**, resting or immediate.

Requirements:

* You must hold an open position in that instrument.
* The order must be on the opposite side to the position.
* Quantity must not exceed the position size.
* Where several reduce-only orders would be reached by the same price move, their combined quantity must not exceed the position either. A stop-loss below the market and a take-profit above it are not combined — no single move reaches both — so you may hold both at full size.

A reduce-only order may rest on the book. It is kept in line with your position as that position changes, and cancelled once the position is closed or flipped.

### Post-Only Orders

`instructions: ["PostOnly"]` marks an order that only adds liquidity. If it would match immediately, it is cancelled. Supported on **Limit** and **Stop-Limit** with `GTC`, `GTD` or `DAY`.

**Stop-Loss & Take-Profit Modes:**

SL/TP orders support two modes controlled by the `closePosition` parameter:

**Managed Orders** (`closePosition: true`):

* Quantity automatically syncs with position size as it changes
* Only one managed SL and one managed TP allowed per instrument
* One-Cancels-Other (OCO): when managed SL or TP fills, the other is automatically cancelled
* Automatically cancelled if position closes or direction flips
* Cannot specify quantity - server manages it based on current position
* Requires either an open position, or a resting entry order on the same instrument to attach to. It can only reduce a position — it can never open one.

**Unmanaged Orders** (`closePosition: false`):

* Fixed quantity specified by you (like regular orders)
* Multiple unmanaged SL/TP orders allowed per instrument
* **Requires an open position.** Place the position first, then attach the trigger.
* Reduce-only: it can only close part or all of your position — it can never open or flip one.
* The quantity you set is an upper bound: the order is kept in line with your position as it changes, and cancelled once the position closes or flips.

### Attaching SL/TP to an entry order

There is no native bracket / OTOCO order type, and no OCO between an entry order and its SL/TP — OCO exists only between a managed SL and a managed TP. What you can do:

* **Managed** SL/TP may be placed while an entry order is still resting. They stay inert until the entry fills, then size themselves to the resulting position.
* **Unmanaged** SL/TP require the position to exist first, so place them after the entry fills.

Neither can open a position on its own, so an entry that never fills cannot leave you with a trigger that opens one. If you cancel the entry order, cancel any managed SL/TP you attached to it.

***

## Time in Force

Controls how long an order remains active:

* **GTC (Good-Til-Canceled)** - Remains active until filled or manually canceled
* **IOC (Immediate-or-Cancel)** - Fill immediately, cancel any unfilled portion
* **FOK (Fill-or-Kill)** - Fill entire order immediately or cancel entirely
* **GTD (Good-Til-Date)** - Expires at specified `expiryDate` timestamp
* **DAY** - Expires at end of trading day 00:00:00 UTC

***

## Order Type Compatibility Matrix

<table><thead><tr><th>Type</th><th width="106.60546875">GTC</th><th width="122.52734375">GTD</th><th width="116.08203125">FOK</th><th width="129.2578125">IOC</th><th>DAY</th></tr></thead><tbody><tr><td>Limit</td><td>✔️</td><td>✔️</td><td>✔️</td><td>✔️</td><td>✔️</td></tr><tr><td>StopLimit</td><td>✔️</td><td>✔️</td><td>✔️</td><td>✔️</td><td>✔️</td></tr><tr><td>StopLoss</td><td>❌</td><td>❌</td><td>✔️</td><td>✔️</td><td>❌</td></tr><tr><td>TakeProfit</td><td>❌</td><td>❌</td><td>✔️</td><td>✔️</td><td>❌</td></tr></tbody></table>

***

## Required Price Fields

| Type       | `limitPrice` | `stopPrice` |
| ---------- | ------------ | ----------- |
| Limit      | required     | —           |
| StopLimit  | required     | required    |
| StopLoss   | required     | required    |
| TakeProfit | required     | required    |
