Order Type

Market Order

A market order executes instantly at the best available price in the market until the specified quantity is filled. Since the execution depends on current market depth and volatility, the final price may differ from expectations, resulting in slippage. Market orders are typically used when immediate execution is prioritized.

Limit Order

A limit order is placed on the order book and will only execute when the market reaches the specified limit price or better. Upon creation, the required cost is reserved from available collateral. Limit orders help traders avoid unfavorable fills caused by price fluctuations.

  • Order Option: All orders are by default GTC (Good Till Cancel), meaning they remain on the order book until fully executed or manually canceled.

TP/SL Order

Take Profit / Stop Loss (TP/SL) is a risk management tool allowing users to manage orders or positions. When the market price (Oracle Price) reaches a preset Trigger Price, the system automatically closes the position using a preset order type (Market or Limit).

Core Attributes:

  • Trigger Source: Oracle Price.

  • Order Types: Market Order, Limit Order.

  • Setup Dimensions: Price, ROI (Return on Investment), PnL (Profit and Loss).

  • Reduce-Only: All TP/SL orders possess the "Reduce-Only" attribute, ensuring the system never opens a reverse position or increases the position size.

Order Models

The system supports two modes for TP/SL setup: Order-based and Position-based.

  1. Order-based: Applicable when placing a new open order. It follows a "Parent-Child" structure.

    • Binding: The Open Order is the Parent; the TP/SL is the Child.

    • Lifecycle:

      • If Parent is cancelled -> Child is automatically cancelled.

      • If Parent is partially filled -> Child is partially activated.

      • Once the Parent is fully filled -> The activated Child order automatically converts to Position-based logic.

    • Modification: TP/SL cannot be modified before the Parent order is filled

  2. Position-based: Applicable to managing any existing position.

    • Binding: Bound to a Position ID. The TP/SL strategy remains valid as long as the position exists.

    • Dynamic Adjustment:

      • Position Increase: TP/SL coverage automatically extends to the new size.

      • Position Decrease: TP/SL quantity automatically reduces.

      • Reverse Open: If a position is closed due to a reverse trade, all associated TP/SL orders are cancelled.

  3. Special Scenarios: In events like Liquidation or ADL, all Reduce-only orders are cancelled.

Last updated