# SperaxOS IL Hedge Recommendation API

> SperaxOS IL Hedge Recommendation API is a paid API for AI agents from chat.sperax.io, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-03).

Given an LP position's token pair, size, and current impermanent loss, returns AI-generated hedge strategy recommendations tailored to the user's risk tolerance and preferred chain.

## Facts

- Endpoint: POST https://chat.sperax.io/api/x402/tools/il-calculator/getHedgeRecommendation?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-03
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/speraxos-il-hedge-recommendation-api-2758f908
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_EmwmDZsCXsIKNbUakfMtF

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 speraxos-il-hedge-recommendation-api-2758f908 -d '<json body>'
```

Example prompt: I have a $15,000 ETH/USDC LP position on Base with about $320 in impermanent loss — can you give me a moderate-risk hedge recommendation to protect it?

## When to prefer this

Use this endpoint when an AI agent needs to generate actionable, risk-calibrated hedging strategies for a specific DeFi LP position experiencing impermanent loss. Prefer this over generic DeFi data APIs when the goal is prescriptive advice (not just IL calculation) and when the user has a known risk tolerance and on-chain preference. Especially useful for agents managing LP positions autonomously on Base.

## Known failure modes

- Invalid or unrecognized token symbols return an error
- Unsupported chain returns no viable venue suggestions
- Missing required fields (token0, token1, positionSizeUsd) cause validation errors
- Payment failure via x402 protocol results in 402 response before processing
- Extremely small position sizes may yield limited or generic recommendations

## How this service works

AI-powered DeFi intelligence APIs payable via the x402 HTTP payment protocol. No API key required — pay per request with USDC on Base. Identity-only (SIWX) endpoints are free for wallets with an agentcash identity.

## Output

Returns an AI-generated hedge recommendation including suggested strategies, on-chain hedging venues appropriate for the specified chain, risk-adjusted advice based on the user's risk tolerance, and guidance relative to current IL and position size.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "chain": {
   "type": "string",
   "description": "Preferred chain for on-chain hedge venues."
  },
  "token0": {
   "type": "string",
   "description": "First token of the pair."
  },
  "token1": {
   "type": "string",
   "description": "Second token of the pair."
  },
  "currentILUsd": {
   "type": "number",
   "description": "Current IL in USD (or estimated future IL)."
  },
  "riskTolerance": {
   "type": "string",
   "description": "Risk tolerance: \"conservative\", \"moderate\", or \"aggressive\"."
  },
  "positionSizeUsd": {
   "type": "number",
   "description": "LP position size in USD."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/speraxos-il-hedge-recommendation-api-2758f908/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chat.sperax.io](https://www.zero.xyz/host/chat.sperax.io/llms.txt)
