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
| Position | TP Trigger |
|---|---|
| Long | Mark price rises above the TP price |
| Short | Mark price falls below the TP price |
Behavior
- When the mark price crosses the TP trigger price, a market order is submitted to close the specified size
- The order is marked as reduce-only to ensure it only closes the existing position
- 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
| Position | SL Trigger |
|---|---|
| Long | Mark price falls below the SL price |
| Short | Mark price rises above the SL price |
Behavior
- When the mark price crosses the SL trigger price, a market order is submitted to close the specified size
- The order is marked as reduce-only
- 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
| Parameter | Description |
|---|---|
| Trigger price | The mark price level at which the order activates |
| Size | Quantity to close (defaults to full position size) |
| Reduce-only | Always true for TP/SL orders |
| Order type | Market 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
| Order | Trigger | Size | Purpose |
|---|---|---|---|
| TP 1 | $65,000 | 25% | Lock in partial profit |
| TP 2 | $70,000 | 25% | Scale out at higher level |
| TP 3 | $80,000 | 50% | Final target |
| SL | $57,000 | 100% | 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