# MoneyTools Position Risk Calculator

> MoneyTools Position Risk Calculator is a paid API for AI agents from tools.moneytools.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-12-03).

Calculates liquidation price, margin requirements, funding costs, and overall risk metrics for a leveraged trading position given entry price, leverage, side, and optional fee/funding parameters.

## Facts

- Endpoint: GET https://tools.moneytools.dev/v1/position-risk?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-03
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/moneytools-position-risk-calculator-62b9abdb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6s5glp2R4B4rBevii2Cg5

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-position-risk-calculator-62b9abdb
```

Example prompt: If I open a long position on BTC at $60,000 with 10x leverage, using a $5,000 position size and a 5 bps taker fee, what's my liquidation price and overall position risk?

## When to prefer this

Use this endpoint when an agent needs to compute position risk metrics for a leveraged derivatives trade in real time, especially when inputs are known (entry price, leverage, side) and the agent needs liquidation price or margin data without connecting to a full exchange API. Ideal for pre-trade risk checks in DeFi or CeFi trading workflows at $0.001 per call with a free daily tier.

## Known failure modes

- Missing required fields (entryPrice, leverage, or side) returns a 400 validation error
- Leverage value outside 1-200 range rejected
- Invalid side value (not 'long' or 'short') causes error
- Payment failure via x402 if free tier exhausted and no valid USDC payment provided
- Malformed numeric inputs return schema validation errors

## How this service works

Catalog of MoneyTools: 116 cheap, read-only tools for AI agents. Free daily tier, then x402 USDC micropayments or prepaid credits. Token safety, approvals, tx decoding, EIP-712 risk, gas, ENS, x402 validation, DNS, RDAP, JSON Schema, time, FX.

## Output

A JSON object containing computed risk metrics for the specified leveraged position, including liquidation price, margin requirements, estimated funding costs, and fee totals, along with payment metadata indicating whether the free tier was used or a $0.001 USDC micropayment was charged.

## 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": [
      "entryPrice",
      "leverage",
      "side"
     ],
     "properties": {
      "side": {
       "type": "string",
       "examples": [
        "long"
       ],
       "description": "long | short"
      },
      "feeBps": {
       "type": "string",
       "examples": [
        5
       ],
       "description": "taker fee bps per side (default 5) (number, sent as a query string)"
      },
      "sizeUsd": {
       "type": "string",
       "examples": [
        1000
       ],
       "description": "position size USD (default 1000) (number, sent as a query string)"
      },
      "leverage": {
       "type": "string",
       "examples": [
        5
       ],
       "description": "1-200 (number, sent as a query string)"
      },
      "holdHours": {
       "type": "string",
       "examples": [
        24
       ],
       "description": "default 24 (number, sent as a query string)"
      },
      "entryPrice": {
       "type": "string",
       "examples": [
        60000
       ],
       "description": "entry price (number, sent as a query string)"
      },
      "fundingRatePct8h": {
       "type": "string",
       "examples": [
        0.01
       ],
       "description": "funding % per 8h (number, sent as a query string)"
      },
      "maintenanceMarginPct": {
       "type": "string",
       "examples": [
        0.5
       ],
       "description": "default 0.5 (number, sent as a query string)"
      }
     }
    }
   }
  },
  "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
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "side": "long",
  "sizeUsd": 1000,
  "warning": "Approximation (isolated margin, constant maintenance margin). Leverage can lose your whole margin. Not financial advice.",
  "leverage": 5,
  "marginUsd": 200,
  "entryPrice": 60000,
  "breakEvenMovePct": 0.13,
  "liquidationPrice": 48300,
  "roundTripFeesUsd": 1,
  "estFundingCostUsd": 0.3,
  "distanceToLiquidationPct": 19.5
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/moneytools-position-risk-calculator-62b9abdb/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)
