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

# Order Types

The eight order types and four time-in-force policies, and what each one requires.

Orders are instructions to buy or sell at specified conditions. They define what, when, and how trades execute on the exchange.

The exchange supports **eight order types** and **four time-in-force policies**. Two of the eight are unconditional — they act the moment they are accepted. The other six are **conditional**: they rest inert until the mark price satisfies a trigger, then fire as either a limit or a market order.

This page is the trader's view. For the exact request shape — which fields each type requires, and the wire types — see [Order Types](https://docs.nexus.xyz/api-reference/guides/order-types) and the per-endpoint pages in the API Reference section, which are generated from the contract.

### Unconditional

* **Market** — executes immediately against resting liquidity; any unfilled size is cancelled.
* **Limit** — rests on the order book at your chosen price until filled or cancelled; fills at that price or better.

### Conditional

All six trigger off the **mark price**, not the last trade — see [Price Oracles](/trading/trading/perpetuals/price-oracles.md). Each pairs a trigger with what it fires, so the choice is two decisions: *when* and *as what*.

| Order type             | Triggers when the mark…                                   | Fires as |
| ---------------------- | --------------------------------------------------------- | -------- |
| **Stop Limit**         | crosses your trigger price in the **adverse** direction   | Limit    |
| **Stop Market**        | crosses your trigger price in the **adverse** direction   | Market   |
| **Take Profit Limit**  | crosses your trigger price in the **favorable** direction | Limit    |
| **Take Profit Market** | crosses your trigger price in the **favorable** direction | Market   |
| **Trailing Stop**      | retraces from its best-seen extreme by your offset        | Market   |
| **Trailing Limit**     | retraces from its best-seen extreme by your offset        | Limit    |

**Stop and take-profit orders differ only in trigger direction.** Both take a `trigger_price`; a stop fires when the market moves against your position, a take-profit when it moves in your favour. Use a stop to cap a loss, a take-profit to realize a gain without watching the book.

**Trailing orders take an offset instead of a fixed trigger.** Set `trailing_offset_bps` and the trigger follows the mark price at that distance, ratcheting as the market moves your way and never loosening when it moves against you. It fires once the mark retraces from its best-seen extreme by the offset. `TrailingLimit` additionally takes `limit_offset_bps`, which prices the limit order relative to the price that fired it.

The limit-firing types (`StopLimit`, `TakeProfitLimit`) also require a limit `price`; the market-firing types do not take one.

> Use `trigger_price` for the trigger threshold. The older `stop_price` field is deprecated — it is still accepted as a fallback when `trigger_price` is absent, and ignored when both are sent.

### Time in force

Required on every order.

| Value                         | Meaning                                                                                                                            |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| **GTC** (Good-Till-Cancelled) | Rests on the book until filled or cancelled.                                                                                       |
| **IOC** (Immediate-or-Cancel) | Fills what it can immediately, cancels the remainder.                                                                              |
| **FOK** (Fill-or-Kill)        | Fills in full immediately, or is cancelled entirely.                                                                               |
| **PostOnly**                  | Rejected if it would take liquidity on entry — so a filled order is **guaranteed to be a maker fill**, and earns the maker rebate. |

`PostOnly` is the policy market makers should quote with: it makes an accidental taker fill impossible rather than merely unlikely. See the [Market Maker Guide](/apis-and-rates/apis-and-rates/market-maker-guide.md).

### Modifiers

* **Reduce-only** — set `reduce_only: true` and the order can only decrease your current position, never increase or flip it.

### Before you send

* **Preview an order** with `POST /orders/preview` to see the margin, equity, fee and liquidation-price impact without submitting it.
* **Amend a resting order** with `PATCH /orders/{order_id}` — an atomic cancel-replace of price and/or size. The replacement carries a **new order id**.
* **Submit in bulk** with `POST /orders/batch`. Orders are processed sequentially and **non-atomically**: an earlier order consuming margin can cause a later one in the same batch to fail, and the batch returns a per-order result you must inspect.

### Planned

* **GTD (Good-Till-Date)** — rests until a chosen expiry or until the order fills.
* **Market-close orders** — sized automatically to fully close your current position.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.nexus.xyz/trading/trading/perpetuals/order-types.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
