crypto_liquidation-price
Calculate liquidation price for leveraged positions. Input entry price, leverage, direction, and collateral to receive liquidation price, margin call price, and distance to liquidation.
Instructions
Liquidation price calculator for leveraged positions.
Use when computing the liquidation price for a leveraged position. Provide entry price, leverage, position side, and maintenance margin. Returns: liquidation price, distance to liquidation, and margin call price.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| leverage | Yes | Leverage multiplier | |
| direction | Yes | Position direction | |
| collateral | Yes | Collateral amount in USD | |
| entry_price | Yes | Position entry price | |
| position_size | Yes | Total position size in USD | |
| funding_accumulated | No | Accumulated funding payments (negative = paid) | |
| maintenance_margin_rate | No | Maintenance margin rate (e.g. 0.005 = 0.5%) |