# UnlockBot Swap Risk API

> UnlockBot Swap Risk API is a paid API for AI agents from 8prtkj444ihx.hostc.app, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-30).

Returns pre-trade swap risk analysis for a token on a given EVM chain, including liquidity depth, price impact, and sandwich attack exposure estimates.

## Facts

- Endpoint: GET https://8prtkj444ihx.hostc.app/swap-risk?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/unlockbot-swap-risk-api-05926fcf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GXl_mxNyRYqO3LeDhUk8H

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 unlockbot-swap-risk-api-05926fcf
```

Example prompt: Before I swap $50,000 worth of UNI on Ethereum with 1% slippage, can you run a pre-trade risk check — tell me the estimated price impact, sandwich attack exposure, and how deep the liquidity is?

## When to prefer this

Choose this endpoint when you need a fast, keyless pre-trade risk assessment for EVM token swaps — specifically when you need sandwich/MEV exposure quantification, not just a honeypot boolean. It excels for large trades (>$1,000) where price impact and attacker profitability matter. Prefer it over generic token screeners when you need numeric liquidity depth, pool-level detail, and sandwich cost modeling in a single call paid with a few cents of USDC.

## Known failure modes

- Token contract address not found on the specified chain — returns error or empty pools
- Chain not supported (only ethereum, base, arbitrum accepted) — schema validation error
- amount_usd below minimum of 1 — rejected by schema
- Insufficient liquidity data for obscure or newly deployed tokens — may return low pool counts or incomplete estimates
- Payment failure (non-200 response) — USDC charge does not apply
- Network or upstream DEX data provider outage — service unavailable

## How this service works

Pay-per-call crypto risk data for AI agents over x402: pre-trade checks, token safety / honeypot screening, whale exchange flows, token unlock risk, wallet profiles. No API key, no signup: pay a few cents of USDC per call. Payment: x402 v2 exact scheme, USDC on Base mainnet (eip155:8453) to 0x21e4F3c6EcDb0F0CADC59511BF675B9BcBbeD304. Charged only on HTTP 200.

## Output

Returns a JSON object with: chain and token symbol, number of pools seen, the deepest liquidity pool (DEX, pair address, DexScreener URL, liquidity in USD), total routable liquidity in USD, estimated price impact percentage, estimated sandwich attack profit and extractable value in USD, and estimated attacker cost in USD. All figures are computed for the given trade size and slippage tolerance.

## 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": [
      "chain",
      "token",
      "amount_usd"
     ],
     "properties": {
      "chain": {
       "enum": [
        "ethereum",
        "base",
        "arbitrum"
       ],
       "type": "string",
       "description": "EVM chain the token lives on"
      },
      "token": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{40}$",
       "description": "Token you buy or sell"
      },
      "amount_usd": {
       "type": "number",
       "minimum": 1,
       "description": "Trade size in USD"
      },
      "slippage_pct": {
       "type": "number",
       "default": 1,
       "maximum": 50,
       "minimum": 0.01,
       "description": "Your slippage tolerance %"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "data": {
   "chain": "ethereum",
   "token": "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",
   "symbol": "UNI",
   "amount_usd": 50000,
   "pools_seen": 30,
   "deepest_pool": {
    "dex": "uniswap",
    "url": "https://dexscreener.com/ethereum/0x1d42064fc4beb5f8aaf85f4617ae8b3b5b8bd801",
    "pair": "0x1d42064Fc4Beb5F8aAF85F4617AE8b3b5B8Bd801",
    "liquidity_usd": 13615639
   },
   "slippage_pct": 3,
   "est_price_impact_pct": 0.289,
   "est_attacker_cost_usd": 156,
   "routable_liquidity_usd": 34474101,
   "est_sandwich_profit_usd": 446.69,
   "est_sandwich_extractable_usd": 602.69
  },
  "endpoint": "/swap-risk"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/unlockbot-swap-risk-api-05926fcf/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 8prtkj444ihx.hostc.app](https://www.zero.xyz/host/8prtkj444ihx.hostc.app/llms.txt)
