Calculators
Lending health factor calculator API
Compute an Aave-style lending health factor: HF = (collateral·liquidationThreshold)/debt, where HF < 1 is liquidatable — plus the collateral price drop to liquidation and a rating bucket. Deterministic risk math. Answers 'what's my health factor','how far from liquidation','is my loan safe'.
Price$0.01per request
MethodPOST
Route/v1/calc/cryptocalc-lending-health-factor
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
calccryptodefilendinghealth-factoraavecollateralliquidation
API URL
Integration docshttps://x402.hexl.dev/v1/calc/cryptocalc-lending-health-factorExample request
{
"collateralValue": 10000,
"liquidationThreshold": 0.825,
"debtValue": 5000
}Example response
{
"formula": "HF = (collateral·liquidationThreshold) / debt",
"collateralValue": 10000,
"liquidationThresholdPct": 82.5,
"adjustedCollateral": 8250,
"debtValue": 5000,
"healthFactor": 1.65,
"liquidationPriceDropPct": 39.3939,
"safe": true,
"interpretation": "safe"
}Input schema
{
"type": "object",
"required": [
"collateralValue",
"liquidationThreshold",
"debtValue"
],
"properties": {
"collateralValue": {
"type": "number",
"description": "collateral value (USD)",
"examples": [
10000
]
},
"liquidationThreshold": {
"type": "number",
"description": "decimal threshold, e.g. 0.825",
"examples": [
0.825
]
},
"debtValue": {
"type": "number",
"description": "borrowed value (USD)",
"examples": [
5000
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}