> 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

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 (IOC/FOK only — 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` is supported on **Limit orders with IOC or FOK** time in force only. Requirements:

* An open position must exist, the order must be on the opposite side, and quantity must not exceed the position size.
* Reduce-only orders may not rest on the book (hence IOC/FOK): a resting reduce-only order could become invalid as the position changes underneath it.
* For resting position protection, use Stop-Loss / Take-Profit instead.

**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
* Can be placed with no open position (to protect a future position), but is **inert until a position exists**: a managed SL/TP can only reduce an existing position — it can never open one. A trigger that would not reduce a position is rejected.

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

* Fixed quantity specified by user (like regular orders)
* Multiple unmanaged SL/TP orders allowed per instrument
* Quantity does NOT auto-adjust when position changes
* May be placed with **no open position** and with a **quantity larger than your current position**. Margin is reserved for these orders like any other resting order.
* **Important:** an unmanaged SL/TP is an independent order. If its trigger price is reached it will execute regardless of your position — it can **open or flip a position**, not only reduce one.
* Auto-cancellation is **position-driven**: an unmanaged SL/TP is cancelled when an existing position closes completely or flips direction. If you have **no position** (for example, when placing one around an unfilled limit order), there is no position event to trigger cleanup — you must cancel it yourself.

### SL/TP are not bracket orders

These orders are **not** linked to any entry order. There is no native bracket / OTOCO support and no OCO between an entry order and its SL/TP (OCO exists only between a managed SL and a managed TP). If you place SL/TP around a resting limit order before it fills:

* **Managed** SL/TP remain inert until the limit fills and a position exists — they cannot open a position on their own.
* **Unmanaged** SL/TP will trigger and **open a position** if the price reaches their trigger, even if your entry limit never filled. If you cancel the entry order, you are responsible for cancelling the associated SL/TP as well.

***

## 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    |
