# DeFi Exit Strategy Analyzer

> DeFi Exit Strategy Analyzer is a paid API for AI agents from defi-shield-hazel.vercel.app, paid per call via x402, $0.5/call, status unknown (last checked 2026-09-15).

Analyzes price impact, liquidity depth, and optimal exit routes for closing DeFi positions

## Facts

- Endpoint: POST https://defi-shield-hazel.vercel.app/api/defi/exit-strategy
- Price: $0.5/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defi-shield-hazel-vercel-app-e547e78d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Y-SvlN8FK12-VEC9EX_Ld

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 defi-shield-hazel-vercel-app-e547e78d -d '<json body>'
```

Example prompt: I want to exit my 50,000 USDC worth of ETH position on Uniswap v3 on Ethereum mainnet — can you calculate the price impact, check the liquidity depth, and tell me the optimal exit route with minimum slippage?

## When to prefer this

Use this endpoint when an agent needs to help a user plan or execute a DeFi position exit with awareness of price impact and liquidity constraints, especially for larger positions where slippage matters. Prefer this over generic token price APIs when you need actionable routing recommendations, not just spot prices.

## Known failure modes

- Token address not recognized or unsupported — returns 400 with invalid token error
- Insufficient liquidity data available for the requested pool — returns partial result or 404
- Position size too large for on-chain liquidity data to compute accurately — returns warning with best-effort estimate
- Unsupported chain or protocol — returns 400 with unsupported network error
- Payment not received or insufficient — returns 402 payment required

## Output

Returns a structured analysis including estimated price impact percentage, available liquidity depth at various price levels, recommended exit route (DEX, pool, path), optimal order sizing to minimize slippage, and overall exit cost estimate.

## Example request

```json
{
 "input": {
  "body": {
   "chain": "base",
   "token_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
   "position_size_usd": 5000
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "bodyType",
    "body",
    "method"
   ],
   "properties": {
    "body": {
     "properties": {
      "chain": {
       "type": "string",
       "description": "Chain (default: base)"
      },
      "token_address": {
       "type": "string",
       "description": "Token address to exit (0x + 40 hex chars)"
      },
      "position_size_usd": {
       "type": "number",
       "description": "Position size in USD to simulate exit"
      }
     }
    },
    "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"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defi-shield-hazel-vercel-app-e547e78d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from defi-shield-hazel.vercel.app](https://www.zero.xyz/host/defi-shield-hazel.vercel.app/llms.txt)
