# ChainRay Liquidity Depth

> ChainRay Liquidity Depth is a paid API for AI agents from chainray.online, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-08).

Returns the order book liquidity depth between two tokens on a specified blockchain, showing buy/sell depth at various price levels

## Facts

- Endpoint: GET https://chainray.online/liquidity-depth/%7BtokenA%7D/%7BtokenB%7D
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-08
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chainray-liquidity-depth-f8ce2ad6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9vcunxVytxMfvyMTYGtXZ

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 chainray-liquidity-depth-f8ce2ad6
```

Example prompt: Can you pull the on-chain liquidity depth between WETH and USDC on Ethereum using ChainRay, so I can see how deep the order book is before I execute a large swap?

## When to prefer this

Use this endpoint when you need granular order book or liquidity pool depth data for a specific token pair on a specific blockchain — particularly before executing large trades or swaps where slippage matters. Prefer this over general token price endpoints when you need to understand available liquidity at multiple price levels rather than just spot price.

## Known failure modes

- Invalid or unsupported token address/symbol returns 400 or empty result
- Unsupported chain identifier returns an error or no data
- Token pair with no existing liquidity pools returns empty depth data
- Network timeout or chain RPC unavailability causes 503
- Payment failure via x402 protocol returns 402 with payment requirements

## How this service works

The most complete blockchain data and intelligence service for AI agents. 93 endpoints across 46 chains, from gas fees to DeFi analytics, with real-time streams, intent routing, and verifiable proofs. Pay-per-request via x402.

## Output

Returns structured liquidity depth data for the specified token pair, including bid and ask depth at various price levels, available liquidity pools, and price impact estimates for different trade sizes on the requested blockchain.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "chain": "ethereum",
   "tokenA": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
   "tokenB": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
  }
 }
}
```

## 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"
    },
    "pathParams": {
     "type": "object"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "tokenA",
      "tokenB"
     ],
     "properties": {
      "chain": {
       "type": "string"
      },
      "tokenA": {
       "type": "string"
      },
      "tokenB": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chainray-liquidity-depth-f8ce2ad6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chainray.online](https://www.zero.xyz/host/chainray.online/llms.txt)
