Scale Out
workflow.run_scale_outScale-out planner: P&L, ROI, and cumulative P&L for each partial exit level. Use when user wants to take profit at multiple targets: "close 30% at $90k, 30% at $95k, 40% at $100k, what's my total P&L?". Returns: per-level pnl, weightedAvgExitPrice, totalRoi.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | Yes | ||
| exits | Yes | ||
| total_size | Yes | Total position size in base currency | |
| entry_price | Yes | Entry price | |
| contractType | No | linear = USDT-margined (default), inverse = coin-margined. total_size is USD notional (contracts) for inverse, and per-level pnl comes back denominated in the base coin. | |
| fee_open_pct | No | Open fee rate (default 0.0002) | |
| fee_close_pct | No | Close fee rate (default 0.0005) |