Scenario Planning
workflow.run_scenario_planningRun a scenario analysis: compute PnL for multiple price-change percentages at once. Edge cases: entryPrice and size above zero; at least one price change in percent; a change of -100 or less is refused for inverse contracts and exactly -100 is allowed for linear only; fees optional (default 0). Not covered: funding, liquidation along the path, slippage, and the probability of each scenario. Use when user asks "show me my P&L if BTC moves -10%, -5%, +5%, +10%". Returns: array of { deltaPct, exitPrice, netPnl, roe }.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"side": "<side>",
"entryPrice": "<entryPrice>",
"size": "<size>",
"deltasPct": "<deltasPct>"
},
"name": "workflow.run_scenario_planning"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | Yes | Trade direction: "long" or "short" | |
| size | Yes | Position size in base asset | |
| deltasPct | Yes | List of price change percentages, e.g. [-10, -5, 0, 5, 10]. Must be at least -100 (exactly -100 only for linear contracts; inverse contracts need more than -100) | |
| entryPrice | Yes | Entry price | |
| feeOpenPct | No | Opening fee fraction | |
| feeClosePct | No | Closing fee fraction | |
| contractType | No | linear = USDT-margined (default), inverse = coin-margined. For inverse, size is USD contracts and pnl/fees come out in the base coin. |