Risk Reward
workflow.run_risk_rewardFull risk:reward analysis: takes a trade with entry, stop, AND target (all three). Calculates R:R ratio, position size, liquidation price, breakeven, and P&L at both stop and target. Returns a verdict label, strong (3:1+) / good (2:1+) / marginal / poor, which grades the R:R ratio against fixed thresholds and is not a recommendation. For a full setup check tied to a live exchange/symbol (including funding cost), see workflow.run_pre_trade_check; its verdict covers overall setup safety, not just R:R. Edge cases: entry_price, stop_loss, take_profit, account_balance and leverage above zero; risk_pct above 0 and at most 100; fee_open_pct and fee_close_pct are fractions from 0 to 0.05 (defaults 0.0002 and 0.0005); mmr 0 to 0.2 as a fraction (0.005 is 0.5%); liqFeeRate 0 to 0.05. Stop and target distances are taken as absolute values from the entry, so a stop or target on the wrong side for the chosen side is not rejected: check the side yourself. Not covered: funding payments, slippage, partial fills, exchange tiered margin (use workflow.run_liquidation_live) and any guarantee that a stop fills at its price. Use when user asks "what's my risk reward on this setup?" or "what R:R do this entry, stop and target give?". liquidation_price and the liquidation distance are null when the position cannot be liquidated (an inverse short at 1x or less): check for null before using them.
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>",
"entry_price": "<entry_price>",
"stop_loss": "<stop_loss>",
"take_profit": "<take_profit>",
"account_balance": "<account_balance>",
"risk_pct": "<risk_pct>",
"leverage": "<leverage>"
},
"name": "workflow.run_risk_reward"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mmr | No | Maintenance margin rate as a fraction, 0 to 0.2 (default 0.005 = 0.5%); not a percent: 0.5% is 0.005, not 0.5 | |
| side | Yes | Trade direction: "long" or "short" | |
| mmBase | No | Value the maintenance margin is taken on: "liquidation" = position value at the liquidation price (default), "entry" = entry value. | |
| leverage | Yes | Leverage multiplier | |
| risk_pct | Yes | Max risk as % of account | |
| stop_loss | Yes | Stop-loss price | |
| liqFeeRate | No | Liquidation fee as a fraction of position value, default 0, max 0.05; added to mmr. | |
| entry_price | Yes | Entry price | |
| take_profit | Yes | Take-profit price | |
| contractType | No | linear = USDT-margined (default), inverse = coin-margined (e.g. Bybit BTCUSD). position_size/notional are USD notional (contracts) for inverse; pnl_at_stop/pnl_at_target come 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) | |
| account_balance | Yes | Account balance in USDT |