# MoneyTools Liquidation Price Calculator

> MoneyTools Liquidation Price Calculator is a paid API for AI agents from tools.moneytools.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-05).

Calculates liquidation price and distance for perpetual futures (isolated margin) or lending positions, including health factor for lending.

## Facts

- Endpoint: GET https://tools.moneytools.dev/v1/liquidation?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-05
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/moneytools-liquidation-price-calculator-d496ee9a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GL9SkoIFiOWT9-qKBdvgj

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability moneytools-liquidation-price-calculator-d496ee9a
```

Example prompt: What's my liquidation price for a long perp position entered at $3000 with 5x leverage and 0.5% maintenance margin?

## When to prefer this

Use this endpoint when you need quick, reliable liquidation price math for either isolated-margin perpetual futures or lending protocol positions without building the formulas yourself. It handles both perp and lending modes in a single endpoint, supports x402 micropayment for pay-as-you-go access with no subscription needed, and is not charged on failure — making it safe for speculative agent calls.

## Known failure modes

- Missing required parameters (mode, side, entry, leverage, or maintenance margin for perp) returns an error
- Invalid parameter types or out-of-range values return a validation error
- Free tier exhausted (10/day) without payment method returns HTTP 402 with PAYMENT-REQUIRED header
- Payment failure via x402 results in no charge and no result
- Lending mode missing collateral, debt, price, or liquidation threshold returns an error

## How this service works

Liquidation price calculator: Perp (isolated margin: side, entry, leverage, maintenance margin) or lending (collateral, debt, liquidation threshold → health factor) liquidation price and distance. Risk math, not advice. Free tier 10/day; then $0.001 via x402 (HTTP 402 + PAYMENT-REQUIRED) or X-API-Key credits. Not charged on failure. $0.001 USDC per call via x402 on Base. Run by MoneyTools.

## Output

Returns a JSON object containing the computed liquidation price, distance to liquidation (as percentage or absolute price difference), and for lending positions the health factor. Also includes payment metadata indicating whether a charge was applied, the network, amount in USD, and transaction hash if paid via x402.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "debt": {
       "type": "string",
       "description": "lending: debt value"
      },
      "mode": {
       "type": "string",
       "examples": [
        "perp"
       ],
       "description": "perp | lending"
      },
      "side": {
       "type": "string",
       "examples": [
        "long"
       ],
       "description": "long | short"
      },
      "entry": {
       "type": "number",
       "examples": [
        "3000"
       ],
       "description": "entry price"
      },
      "price": {
       "type": "string",
       "description": "lending: collateral price"
      },
      "leverage": {
       "type": "number",
       "examples": [
        "5"
       ],
       "description": "x"
      },
      "collateral": {
       "type": "string",
       "description": "lending: collateral amount"
      },
      "maintenanceMargin": {
       "type": "number",
       "examples": [
        "0.5"
       ],
       "description": "%"
      },
      "liquidationThreshold": {
       "type": "string",
       "examples": [
        "80"
       ],
       "description": "lending: LT %"
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "properties": {
      "payment": {
       "type": "object",
       "properties": {
        "charged": {
         "type": "boolean"
        },
        "network": {
         "type": "string"
        },
        "amountUsd": {
         "type": "string"
        },
        "transaction": {
         "type": [
          "string",
          "null"
         ]
        }
       }
      },
      "freeTier": {
       "type": "object"
      },
      "_moneytools": {
       "type": "object",
       "description": "optional plan / partner hints"
      }
     },
     "description": "Tool-specific JSON result (see llms.txt / openapi.json). Always includes payment info.",
     "additionalProperties": true
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/moneytools-liquidation-price-calculator-d496ee9a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from tools.moneytools.dev](https://www.zero.xyz/host/tools.moneytools.dev/llms.txt)
