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

# Order Type

Perpetual futures trading supports six order types: Limit Order, Market Order, Trigger Order, Post-Only, Trailing Order, and TWAP (Time-Weighted Average Price) Order.

&#x20;

1\. Limit Order

A limit order allows you to place a buy or sell order at a specified price or better. Execution is not guaranteed and only occurs if the market price reaches the preset price.

·        Buy Limit Order: Executes at the preset price or lower.

·        Sell Limit Order: Executes at the preset price or higher.

&#x20;

2\. Market Order

A market order is executed immediately at the best available market price.

·        Only the futures contract type and amount are required; execution price depends on order book liquidity.

·        Execution is guaranteed, but the order price cannot be specified.

&#x20;

3\. Trigger Order

A trigger order allows you to preset a trigger price, order price, and amount. Once the last traded price reaches the trigger price, the system automatically places the order with preset parameters.

·        Supports both limit and market order types, following existing trading rules.

·        Your assets will not be frozen until your trigger order is triggered.

·        Trigger failure may come from price limits, insufficient balance, or system issues.&#x20;

·        Execution may fail even after your order is triggered due to market fluctuations.

o    A limit order is placed at the preset price with execution subject to market conditions.

o    A market order is executed at the current market price with execution subject to liquidity.

&#x20;

4\. Post-Only

A Post-Only order will not be executed immediately after being placed.

·        Post-Only orders will be automatically canceled, if they match immediately with existing ones in the market.

·        These orders ensure you always act as a maker (liquidity provider).

&#x20;

5\. Trailing stop

A trailing stop order allows you to set a stop price that follows the market as it moves in your favor. If the price reverses by a set percentage, it triggers a market order.

·        Requires setting a trigger price and a callback rate. A limit order will be placed at the preset price after the conditions are reached.

·        Use Cases: Buy on a rebound after a price drop; Sell on a pullback after a price rally.

&#x20;

6\. Time-Weighted Average Price (TWAP)

A TWAP order splits a large order into smaller portions over a set period, helping reduce market impact and improve execution price stability.

·        Ideal for large orders, smooth entry/exit, or reducing timing risk.

·        Parameters:

o    Total Amount: Total contracts to buy or sell.

o    Order Type: Limit order (preset price) or market order (best available market price).

o    Order Splitting Rules:

§   By number of slices (e.g., 20)

§   By fixed single order size (e.g., 2 contracts per order)

o    Interval: Time difference between two slices (e.g., 30 seconds, 1 minute).

o    Validity Period: Total strategy duration or until all orders are filled.
