# OP Mainnet DEX Liquidity Depth Risk Classifier

> OP Mainnet DEX Liquidity Depth Risk Classifier is a paid API for AI agents from x402.donnyautomation.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Classifies liquidity depth (DEEP/MODERATE/SHALLOW/VERY_THIN) for a trading pair on OP Mainnet by aggregating live TVL across SushiSwap and Uniswap v3 fee tiers and flagging thin-market risks before a trade.

## Facts

- Endpoint: GET https://x402.donnyautomation.com/optimism/risk
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/op-mainnet-dex-liquidity-depth-risk-classifier-5b29731b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_T0Vh7silE41s66-f5l4kp

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 op-mainnet-dex-liquidity-depth-risk-classifier-5b29731b
```

Example prompt: Before I swap, can you check the liquidity depth for WETH/USDC on OP Mainnet — tell me if the market is DEEP, MODERATE, SHALLOW, or VERY_THIN, how many venues can route the trade, and whether it's concentrated in a single DEX?

## When to prefer this

Choose this endpoint when you need a pre-trade liquidity risk classification specifically on OP Mainnet (Optimism), aggregating across both SushiSwap and Uniswap v3. Prefer it over generic price endpoints when your concern is market depth, slippage risk, venue concentration, or thin-market warnings rather than price alone. Use the sibling Arbitrum endpoint for Arbitrum One pairs, and the BSC endpoint for BNB Chain.

## Known failure modes

- Unknown or unsupported token pair symbol returns an error or empty result
- Pair not found on any OP Mainnet venue returns VERY_THIN or no-data response
- Network congestion on Optimism may cause stale or delayed TVL reads
- Malformed pair string (e.g. missing slash or wrong symbols) causes input validation error
- Payment failure (non-402-compliant client) blocks access to the endpoint

## How this service works

Pre-trade depth verdict for a pair on OP Mainnet: is this market thin enough to hurt you. Returns depthClass DEEP|MODERATE|SHALLOW|VERY_THIN, totalTvlUsd, venueCount, topVenueShare, midSpreadBps, flags. Requires ?pair=SYM/SYM (e.g. WETH/USDC). Errors: 400 bad_pair, 404 no_pools, 502 upstream_read_failed. Depth only - NOT a contract audit or honeypot check. Per-venue detail is /liquidity. Chain-pinned; bare /risk = BSC.

## Output

Returns a depth classification (DEEP, MODERATE, SHALLOW, or VERY_THIN), live TVL broken down by SushiSwap and Uniswap v3 fee tiers, a count of venues capable of routing the trade, the concentration share of the largest venue, a boolean flag for single-venue markets, and a flag for wide spreads.

## 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": [
      "pair"
     ],
     "properties": {
      "pair": {
       "type": "string",
       "description": "Token pair as SYM/SYM on OP Mainnet (e.g. WETH/USDC)."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ts": "2026-07-31T00:00:00.000Z",
  "chainId": 10,
  "network": "optimism"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/op-mainnet-dex-liquidity-depth-risk-classifier-5b29731b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.donnyautomation.com](https://www.zero.xyz/host/x402.donnyautomation.com/llms.txt)
