Calculators
Leverage liquidation price API
Isolated-margin liquidation price for a leveraged position: long liqPrice = entry · (1 − 1/leverage + maintenanceMarginRate). Deterministic margin math LLMs get wrong. Answers 'where do I get liquidated at 10x','liquidation price for my long','how far can price drop before margin call'.
Price$0.01per request
MethodPOST
Route/v1/calc/trade-leverage-liquidation
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
calctradingleverageliquidationmarginfuturesperpetualsrisk
API URL
Integration docshttps://x402.hexl.dev/v1/calc/trade-leverage-liquidationExample request
{
"entry": 100,
"leverage": 10,
"direction": "long",
"maintenanceMarginRate": 0.005
}Example response
{
"entry": 100,
"leverage": 10,
"direction": "long",
"maintenanceMarginRate": 0.005,
"initialMarginRate": 0.1,
"liquidationPrice": 90.5,
"liquidationMovePct": 9.5,
"formula": "long: liqPrice = entry · (1 − 1/leverage + mmr)"
}Input schema
{
"type": "object",
"required": [
"entry",
"leverage"
],
"properties": {
"entry": {
"type": "number",
"examples": [
100
]
},
"leverage": {
"type": "number",
"examples": [
10
]
},
"direction": {
"type": "string",
"enum": [
"long",
"short"
],
"default": "long"
},
"maintenanceMarginRate": {
"type": "number",
"default": 0.005,
"description": "Maintenance margin rate (decimal).",
"examples": [
0.005
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}