workflow.run_pre_trade_check
Full pre-trade decision card: orchestrates position sizing, breakeven, liquidation, and funding cost in one call. Use when user describes a full trade setup and asks "should I take this trade?" or "run the numbers on this setup". Provide exchange+symbol to fetch live funding rate automatically. Returns: positionSize, breakeven, liquidationPrice, fundingCost, overnightBreakevenShift, verdict.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mmr | No | Maintenance margin rate, default 0.005 | |
| side | Yes | ||
| symbol | No | Perpetual symbol, e.g. "BTCUSDT". | |
| exchange | No | Exchange code, e.g. "binance" or "bybit". Used to fetch live funding rate if funding_rate is omitted. | |
| leverage | Yes | Leverage multiplier | |
| risk_pct | Yes | Risk as % of balance, e.g. 1.0 = 1% | |
| stop_loss | Yes | Stop-loss price (positive) | |
| hold_hours | No | Expected hold time in hours for overnight shift calc. Default 8. | |
| entry_price | Yes | Entry price (positive) | |
| fee_open_pct | No | Opening fee fraction, default 0.0002 | |
| funding_rate | No | Funding rate per 8h as decimal, e.g. 0.0001. If omitted, fetched live from exchange. | |
| fee_close_pct | No | Closing fee fraction, default 0.0005 | |
| account_balance | Yes | Total account balance in USDT |