leverage calc
leverage-calcMax safe leverage for a perp trade: liquidation >=1.5x beyond stop (never off), costs vs move, risk per trade, measured survival cap, exchange limit -> min with the binding constraint named Price: $0.05 per call, USDC on Base via x402.
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": {
"symbol": "<symbol>",
"equity": "<equity>",
"entry": "<entry>",
"stop_loss": "<stop_loss>"
},
"name": "leverage-calc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | optional: preserve (default) | target | |
| entry | Yes | number | |
| equity | Yes | number (USD) | |
| symbol | Yes | string, e.g. ETHUSDT | |
| stop_loss | Yes | number | |
| take_profit | No | number (optional) | |
| risk_per_trade | No | number (optional, fraction, default 0.02) | |
| exchange_max_leverage | No | number (optional) |