calc_engine
BEHAVIOR: Deterministic mathematical calculation. Evaluates crypto futures risk management models using live exchange parameters.
PRICING: $0.001 USD per execution. Deducted from daily tariff quota or USD balance.
SYNTAX EXAMPLES (Passed in 'command'):
'/pos btc 65k 63.7k 50' (Position Sizing)
'/liq sol 20x short' (True Liquidation with MMR)
'/dca btc 65k:100 64k:200' (DCA Break-Even with exit fees)
'/rr btc 65k 64k 67k 69k' (Multi-Target R:R)
'/fncost btc 10000 long' (Carry Cost)
'/atr btc 1h 2' (Volatility Stops)
RETURNS: Output is a structured JSON payload. Depending on the command, keys include: 'ideal_lot_coins', 'notional_usd', 'required_margin', 'liquidation_price', 'true_breakeven_price', 'effective_rr_ratio', or 'stop_distance'.
USAGE GUIDELINES: Use this tool exclusively for mathematical risk modeling and lot sizing. For live market scanning, use market_data. For setting execution triggers, use alert_manager. After calculating risk parameters, it is highly recommended to route the generated stop-loss or liquidation prices into alert_manager to automate monitoring.
ERRORS: Malformed syntax returns an 'error' JSON key with correction guidance.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | The CLI risk command (e.g. '/pos btc 65000 63700 50'). | |
| exchange | No | Default exchange context if not explicitly specified inside the command string. | bybit |