# Nansen Prediction Market Orderbook

> Nansen Prediction Market Orderbook is a paid API for AI agents from api.nansen.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Retrieves the current orderbook for a specified prediction market, showing bids and asks with depth and pricing data.

## Facts

- Endpoint: GET https://api.nansen.ai/api/v1/prediction-market/orderbook
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-nansen-ai-9cd4804c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GlRphlCi7MrWkXwxrW4VN

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 api-nansen-ai-9cd4804c
```

Example prompt: Pull the current Nansen orderbook for the prediction market on the next Fed rate decision — show me all the bids and asks with their price levels and sizes.

## When to prefer this

Use this endpoint when you need real-time orderbook depth and open order data for a specific prediction market, especially when you want Nansen's smart money labeling context. Prefer over generic DEX APIs when you need wallet-labeled order attribution.

## Known failure modes

- Invalid or unknown market identifier returns 404 or empty result
- Market not yet tracked by Nansen returns no data
- Malformed POST body returns 400 validation error
- Rate limit exceeded returns 429
- Payment not provided or insufficient returns 402

## How this service works

Get Prediction Market Orderbook

## Output

Returns the full orderbook for the specified prediction market, including bid and ask orders with price levels, quantities, and depth data, sourced from Nansen's on-chain smart money analytics.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "title": "OrderbookRequest",
 "required": [
  "market_id"
 ],
 "properties": {
  "market_id": {
   "type": "string",
   "title": "Market Id",
   "examples": [
    "654412"
   ],
   "maxLength": 100,
   "minLength": 1,
   "description": "Polymarket market ID"
  },
  "pagination": {
   "type": "object",
   "title": "PaginationRequest",
   "properties": {
    "page": {
     "type": "integer",
     "title": "Page",
     "default": 1,
     "minimum": 1,
     "description": "Page number (1-based)"
    },
    "per_page": {
     "type": "integer",
     "title": "Per Page",
     "default": 10,
     "maximum": 1000,
     "minimum": 1,
     "description": "Number of records per page (max 1000)"
    }
   },
   "description": "Pagination parameters for API requests."
  }
 },
 "description": "Request for orderbook endpoint.",
 "additionalProperties": false
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "title": "OrderbookResponse",
 "required": [
  "data"
 ],
 "properties": {
  "data": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "OrderbookLevel",
    "required": [
     "market_id"
    ],
    "properties": {
     "side": {
      "anyOf": [
       {
        "type": "string"
       }
      ],
      "title": "Side",
      "examples": [
       "buy"
      ],
      "description": "buy or sell"
     },
     "size": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Size",
      "examples": [
       1000
      ],
      "description": "Size at level"
     },
     "price": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Price",
      "examples": [
       0.52
      ],
      "description": "Price level"
     },
     "outcome": {
      "anyOf": [
       {
        "type": "string"
       }
      ],
      "title": "Outcome",
      "examples": [
       "Yes"
      ],
      "description": "Outcome label"
     },
     "asset_id": {
      "anyOf": [
       {
        "type": "string"
       }
      ],
      "title": "Asset Id",
      "examples": [
       "71321045679252212"
      ],
      "description": "CLOB token ID"
     },
     "event_id": {
      "anyOf": [
       {
        "type": "string"
       }
      ],
      "title": "Event Id",
      "description": "Event ID"
     },
     "market_id": {
      "type": "string",
      "title": "Market Id",
      "examples": [
       "654412"
      ],
      "description": "Market ID"
     },
     "outcome_index": {
      "anyOf": [
       {
        "type": "integer"
       }
      ],
      "title": "Outcome Index",
      "examples": [
       1
      ],
      "description": "Outcome index"
     },
     "cumulative_size": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Cumulative Size",
      "examples": [
       5000
      ],
      "description": "Cumulative size"
     },
     "snapshot_timestamp": {
      "anyOf": [
       {
        "type": "string",
        "format": "date-time"
       }
      ],
      "title": "Snapshot Timestamp",
      "examples": [
       "2024-11-01T12:00:00"
      ],
      "description": "Snapshot timestamp"
     }
    },
    "description": "Orderbook level from ch_api_pm_orderbook."
   },
   "title": "Data",
   "description": "List of orderbook level records"
  },
  "pagination": {
   "type": "object",
   "title": "PaginationInfo",
   "properties
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-nansen-ai-9cd4804c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.nansen.ai](https://www.zero.xyz/host/api.nansen.ai/llms.txt)
