TradingTake Profit & Stop Loss (TP/SL)

Take-Profit and Stop-Loss

Take-profit (TP) and stop-loss (SL) are conditional orders that automatically trigger when the mark price reaches a specified level, allowing traders to lock in profits or limit losses without actively monitoring positions.

Take-Profit Orders

A take-profit order triggers when the mark price reaches a favorable level, closing part or all of a position at a profit.

Trigger Conditions

PositionTP Trigger
LongMark price rises above the TP price
ShortMark price falls below the TP price

Behavior

  1. When the mark price crosses the TP trigger price, a market order is submitted to close the specified size
  2. The order is marked as reduce-only to ensure it only closes the existing position
  3. If the position has already been closed or reduced below the TP size, the TP order size is clamped to the remaining position

Stop-Loss Orders

A stop-loss order triggers when the mark price reaches an unfavorable level, closing part or all of a position to limit losses.

Trigger Conditions

PositionSL Trigger
LongMark price falls below the SL price
ShortMark price rises above the SL price

Behavior

  1. When the mark price crosses the SL trigger price, a market order is submitted to close the specified size
  2. The order is marked as reduce-only
  3. Slippage may occur between the trigger price and the execution price, especially in volatile markets

Attached TP/SL

TP and SL orders can be attached to a position at the time of opening or added later:

  • At open: Submit a limit or market order with TP/SL parameters. The conditional orders are created when the position is filled
  • After open: Add TP/SL to an existing position via the API or trading interface
  • Modification: TP/SL levels can be updated at any time while the position is open

Parameters

ParameterDescription
Trigger priceThe mark price level at which the order activates
SizeQuantity to close (defaults to full position size)
Reduce-onlyAlways true for TP/SL orders
Order typeMarket order (immediate execution upon trigger)

Multiple TP/SL Levels

Traders can set multiple TP and SL levels on a single position to implement scaled exit strategies:

Example: Long BTC-USD at $60,000

OrderTriggerSizePurpose
TP 1$65,00025%Lock in partial profit
TP 2$70,00025%Scale out at higher level
TP 3$80,00050%Final target
SL$57,000100%Maximum loss limit

Execution Notes

  • TP/SL orders are checked against the mark price (not the last trade price or oracle price)
  • Trigger checks occur every block (near-instant finality), providing near-real-time responsiveness
  • In fast-moving markets, the execution price may differ from the trigger price due to slippage
  • TP/SL orders are automatically cancelled when the associated position is fully closed by other means

Trailing Stop-Loss

Trailing stop-loss orders are supported, where the stop price moves with the market:

  • For long positions, the stop price trails the highest mark price by a fixed offset or percentage
  • For short positions, the stop price trails the lowest mark price
  • The stop price only moves in the favorable direction — it never retreats