Open Position with TP/SL
open_with_bracketOpen a perpetual futures position with attached take-profit and stop-loss orders, ensuring protection even when the bot is offline. Specify symbol, side, and size; preview before confirming.
Instructions
Open a perp position with EXCHANGE-NATIVE take-profit / stop-loss attached, so the position is protected even if this bot or the user's computer is off, Pacifica closes it at the trigger price. side: 'long'/'short'. usd: notional size. stop_loss_pct / take_profit_pct: distance from entry as a percent (e.g. 3 = 3%); 0 disables that leg. Triggers use mark price. IMPORTANT: places a REAL order, call with confirm=false first to preview, confirm=true only after the user approves. Carries builder code 'mustache' (if approved).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| usd | Yes | ||
| side | Yes | ||
| symbol | Yes | ||
| confirm | No | ||
| stop_loss_pct | No | ||
| take_profit_pct | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |