# AgentsToolsHub Impermanent Loss Calculator

> AgentsToolsHub Impermanent Loss Calculator is a paid API for AI agents from agentstoolshub.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-27).

Computes impermanent loss percentage for a 50/50 constant-product AMM position given a relative price change between two assets

## Facts

- Endpoint: GET https://agentstoolshub.com/api/v1/crypto/impermanent-loss?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-27
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentstoolshub-impermanent-loss-calculator-c682b878
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kWUqBqYKoe2clfFa5Rdp8

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 agentstoolshub-impermanent-loss-calculator-c682b878
```

Example prompt: What's the impermanent loss I'd face in a 50/50 AMM pool if one of my assets goes up 100% against the other — can you give me the exact IL percentage so I can compare it against the farming yield?

## When to prefer this

Use this endpoint when you need a precise, deterministic impermanent loss figure for a 50/50 constant-product AMM pool at any specific price change percentage, especially when comparing IL against farming APY to make LP entry/exit decisions; prefer this over manual formula calculations or approximations when accuracy matters for financial decisions

## Known failure modes

- Missing required priceChangePct parameter returns a 400 error
- Extremely large price change values may return boundary-condition results
- Network or payment failure returns a 402 or 5xx error
- Invalid non-numeric priceChangePct value returns a validation error

## How this service works

Compute impermanent loss for a 50/50 constant-product AMM position at any relative price move, with a reference table of common moves. Deterministic closed-form — the exact divergence number an LP should compare against farming rewards. Use this when an agent needs to aMM divergence loss for any price move.

## Output

Returns the exact impermanent loss percentage for the specified price change, computed using the closed-form constant-product AMM divergence formula, along with a reference table of IL values at common price move increments for quick comparison against farming rewards

## 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": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "priceChangePct"
     ],
     "properties": {
      "priceChangePct": {
       "type": "number",
       "description": "How much asset A moved vs B: 100 = 2×, -50 = half"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

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