# Polymarket CLOB Orderbook

> Polymarket CLOB Orderbook is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Returns live CLOB orderbook data for a Polymarket outcome token, including top N bids and asks, best bid/ask, mid-price, and spread.

## Facts

- Endpoint: POST https://agent402.tools/api/polymarket-orderbook
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/polymarket-clob-orderbook-e6dcf67a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5pRcnoQURnCPfahu353iW

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 polymarket-clob-orderbook-e6dcf67a -d '<json body>'
```

Example prompt: Pull the live Polymarket orderbook for token ID 12345678 with 20 levels on each side — show me the top bids and asks, best bid/ask, mid-price, and spread.

## When to prefer this

Use this endpoint when you need real-time orderbook depth, liquidity, and pricing information for a specific Polymarket outcome token. Prefer this over general market info endpoints when you need precise bid/ask levels for trading decisions, arbitrage analysis, or market making on Polymarket's CLOB.

## Known failure modes

- Invalid or unknown clobTokenId returns an error or empty orderbook
- Depth value outside 1-50 range may be rejected or clamped
- Polymarket CLOB API unavailable causes upstream timeout
- Payment failure (x402) results in 402 status and no data returned
- Stale or illiquid market may return sparse or empty orderbook levels

## How this service works

Live CLOB orderbook for a Polymarket outcome token. Returns top N bids (highest first), top N asks (lowest first), best bid/ask, mid-price, and spread. Use a clobTokenId from polymarket-market or polymarket-search.

## Output

Returns a structured orderbook with top N bids (sorted highest first) and top N asks (sorted lowest first) for the specified Polymarket CLOB outcome token, along with the best bid price, best ask price, mid-price, and spread.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "depth": {
   "type": "number",
   "description": "Levels each side to return (1-50, default 10)."
  },
  "tokenId": {
   "type": "string",
   "description": "CLOB token id (decimal string) from market.clobTokenIds."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "asks": [
   {
    "size": 800,
    "price": 0.63
   },
   {
    "size": 1200,
    "price": 0.64
   }
  ],
  "bids": [
   {
    "size": 1000,
    "price": 0.61
   },
   {
    "size": 500,
    "price": 0.6
   }
  ],
  "asset": "72909...",
  "market": "0xabc...",
  "source": "polymarket-clob",
  "spread": 0.02,
  "bestAsk": 0.63,
  "bestBid": 0.61,
  "tokenId": "72909...",
  "midPrice": 0.62,
  "timestamp": "1751234567"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/polymarket-clob-orderbook-e6dcf67a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
