setTradingStop
Set stop loss, take profit, and trailing stop on open positions. Supports full or partial position modes for precise risk management.
Instructions
Configure trading stop parameters including take profit, stop loss, and trailing stop. Supports both full position and partial position TP/SL modes.
Agent hint: Use this to set TP/SL/trailing stop on an open position. Set tpslMode to Full for entire position or Partial for partial. In Partial mode, tpSize and slSize must be equal. Set any value to "0" to cancel it. positionIdx is required: 0 for one-way mode, 1 for buy hedge, 2 for sell hedge.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | Yes | ||
| symbol | Yes | ||
| takeProfit | No | ||
| stopLoss | No | ||
| trailingStop | No | ||
| tpTriggerBy | No | ||
| slTriggerBy | No | ||
| activePrice | No | ||
| tpslMode | Yes | ||
| tpSize | No | ||
| slSize | No | ||
| tpLimitPrice | No | ||
| slLimitPrice | No | ||
| tpOrderType | No | ||
| slOrderType | No | ||
| positionIdx | Yes |