# Vextorium Impermanent Loss Calculator

> Vextorium Impermanent Loss Calculator is a paid API for AI agents from api.vextorium.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-02).

Calculates impermanent loss for Uniswap v2 (full range) and v3/v4 (concentrated range) positions, including IL vs holding comparison, out-of-range flag, and final token composition.

## Facts

- Endpoint: POST https://api.vextorium.com/calculadora-il-pago?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/vextorium-impermanent-loss-calculator-9b64718e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_u5TEEbOl5niYk-UAXdR8C

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 vextorium-impermanent-loss-calculator-9b64718e -d '<json body>'
```

Example prompt: I entered a Uniswap v3 concentrated liquidity position when the price was 1800 USDC per ETH, with a range from 1600 to 2200. The current price is now 2500 — can you calculate my impermanent loss, tell me if I'm out of range, and show my final token mix?

## When to prefer this

Use this endpoint when you need a fast, structured computation of impermanent loss for Uniswap v2 or v3/v4 positions without querying on-chain data — ideal for pre-entry scenario planning, portfolio monitoring, or educational tools. Prefer this over on-chain pool queries (like the sibling Uniswap v3 pool state endpoint) when you already know the entry and current prices and just need the IL math.

## Known failure modes

- Missing required fields (precio_inicial or precio_final) returns a validation error
- Invalid numeric types for price inputs cause a 400 error
- Providing rango_min > rango_max may result in unexpected IL output or an error
- Extreme price ratios (e.g. 0 or near-infinity) may return null values for some fields
- If the pool type cannot be determined from inputs, tipo and nota may be null

## How this service works

Impermanent loss calculator for Uniswap v2 (full range) and v3/v4 concentrated ranges: IL vs holding, out-of-range flag and final token mix.

## Output

Returns an object with: impermanent loss as a percentage (perdida_impermanente_pct), price change percentage (cambio_precio_pct), whether the position is out of range (fuera_de_rango boolean), final token composition showing token0 and token1 percentages, the pool type (v2 full range or v3 concentrated), the price range used, and an optional note with additional context.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "precio_inicial",
      "precio_final"
     ],
     "properties": {
      "rango_max": {
       "type": "number",
       "description": "Optional upper bound of the range"
      },
      "rango_min": {
       "type": "number",
       "description": "Optional lower bound of the range"
      },
      "precio_final": {
       "type": "number",
       "description": "Current or target price"
      },
      "precio_inicial": {
       "type": "number",
       "description": "Price at entry"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "nota": {
       "type": [
        "string",
        "null"
       ]
      },
      "tipo": {
       "type": [
        "string",
        "null"
       ]
      },
      "rango": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": [
         "number",
         "null"
        ]
       }
      },
      "fuera_de_rango": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "cambio_precio_pct": {
       "type": [
        "number",
        "null"
       ]
      },
      "composicion_final": {
       "type": [
        "object",
        "null"
       ],
       "properties": {
        "token0_pct": {
         "type": [
          "number",
          "null"
         ]
        },
        "token1_pct": {
         "type": [
          "number",
          "null"
         ]
        }
       }
      },
      "perdida_impermanente_pct": {
       "type": [
        "number",
        "null"
       ]
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/vextorium-impermanent-loss-calculator-9b64718e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.vextorium.com](https://www.zero.xyz/host/api.vextorium.com/llms.txt)
