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

# Order Types

AFX supports multiple order types to accommodate different trading strategies.

## Market Order

A Market Order executes immediately at the best available price in the order book.

* **Size** can be specified in the base currency (e.g., BTC) or in USDC.
* A **slippage tolerance** is applied to protect against unfavorable price movements. The default slippage is 3% (configurable from 0.5% to 5% per trading pair).
* The execution price is bounded by: Long — `Last Price * (1 + slippage)`, Short — `Last Price * (1 - slippage)`. Any portion of the order beyond the slippage boundary is cancelled.
* Market orders support attaching **Take Profit / Stop Loss** triggers.

## Limit Order

A Limit Order is placed at a specific price and will only execute at that price or better.

* **Price range:** 10% of Mark Price to 999,999.
* Supports quick-fill from the last traded price.
* **Time-in-force** options:
  * **GTC** (Good-Til-Cancelled) — The order remains active until fully filled or manually cancelled. This is the default.
  * **IOC** (Immediate-Or-Cancel) — Any unfilled portion is immediately cancelled.
  * **FOK** (Fill-Or-Kill) — The order must be filled entirely or it is cancelled completely.
  * **Post-Only** — The order will only be placed as a maker order. If it would immediately match, it is rejected instead.
* Limit orders support **Take Profit / Stop Loss** and **Reduce Only** options.

## Conditional Market Order (Stop Market)

A Conditional Market Order becomes a Market Order when the trigger price is reached.

* **Trigger Price** can be based on **Last Price** or **Mark Price**.
* Price range: 10% of Mark Price to 999,999.
* No margin cost check at the time of placement — the check occurs when the order is triggered.
* Supports **Reduce Only**.

## Conditional Limit Order (Stop Limit)

A Conditional Limit Order becomes a Limit Order when the trigger price is reached.

* Both a **Trigger Price** and a **Limit Price** are required.
* Trigger price can be based on **Last Price** or **Mark Price**.
* No margin cost check at the time of placement.
* Supports all time-in-force options available for Limit Orders.
* Supports **Reduce Only**.

## TWAP Order

TWAP (Time-Weighted Average Price) execution splits a large order into smaller sub-orders over a specified time period to reduce market impact. Availability may vary by market, account state, and product rollout stage.

## Reduce Only

Reduce Only is a special order attribute (available in One-Way mode) that ensures the order will only reduce an existing position — it will never open a new position or increase exposure in the opposite direction.

* If you are long, a Reduce Only sell order will only reduce or close your long position.
* If you are short, a Reduce Only buy order will only reduce or close your short position.
* If there is no open position, the Reduce Only order is rejected.
* If the position is closed before the Reduce Only order executes, the order is automatically cancelled.

## Order Limits

| Parameter                     | Limit |
| ----------------------------- | ----- |
| Active orders per symbol      | 200   |
| Conditional orders per symbol | 100   |


---

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

```
GET https://docs.afx.xyz/trading-rules/order-types.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
