Polymarket prediction market orderbook depth via Nansen's on-chain analytics API
What it does
This endpoint returns the full bid/ask orderbook for a Polymarket prediction market. Data is polled from the Polymarket CLOB API approximately every 60 seconds with MD5 change detection, providing near-real-time snapshots of liquidity at each price level. The response includes market ID, outcome labels (Yes/No), asset IDs, side (buy/sell), price, size, cumulative size, and snapshot timestamp for each orderbook level.
The endpoint is part of Nansen's broader API (v1), which covers blockchain analytics including smart money tracking, wallet profiling, token screening, DEX trades, PnL analysis, and prediction market intelligence across Polymarket. It accepts a POST request with a JSON body containing a required `market_id` field and optional pagination parameters. Pricing is $0.01 per call via the x402 protocol, or 10 credits (free tier) / 1 credit (pro tier) when using Nansen's credit-based billing. Rate limits are enforced per-second and per-minute, reported via response headers.
The endpoint returned HTTP 402 on probe, confirming it is live and requires payment or API key authentication. The full OpenAPI 3.1.0 schema is available with detailed request/response models including the `OrderbookRequest` and `OrderbookResponse` schemas.
Capabilities
Use cases
- —Retrieve current bid/ask depth and spread for a Polymarket prediction market
- —Monitor liquidity changes across Polymarket outcomes over time
- —Feed prediction market orderbook data into trading bots or analytics dashboards
- —Assess market maker activity and price discovery on Polymarket
- —Compare liquidity across multiple Polymarket markets programmatically
Fit
Best for
- —Agents needing real-time Polymarket orderbook snapshots
- —Quantitative analysis of prediction market liquidity
- —Building Polymarket trading or monitoring tools
Not for
- —Historical tick-by-tick orderbook replay (snapshots are ~60s intervals)
- —Non-Polymarket prediction platforms (only Polymarket is supported)
- —Free unlimited usage (requires payment or API key credits)
Quick start
curl -X POST https://api.nansen.ai/api/v1/prediction-market/orderbook \
-H 'Content-Type: application/json' \
-H 'apiKey: YOUR_API_KEY' \
-d '{"market_id": "654412", "pagination": {"page": 1, "per_page": 20}}'Example
Request
{
"market_id": "654412",
"pagination": {
"page": 1,
"per_page": 10
}
}Response
{
"data": [
{
"side": "buy",
"size": 1000,
"price": 0.52,
"outcome": "Yes",
"asset_id": "71321045679252212",
"event_id": "12345",
"market_id": "654412",
"outcome_index": 1,
"cumulative_size": 5000,
"snapshot_timestamp": "2024-11-01T12:00:00"
}
],
"pagination": {
"page": 1,
"per_page": 10,
"is_last_page": false
}
}Endpoint
Quality
Full OpenAPI 3.1.0 schema with detailed request/response models is available. The endpoint returned 402 on probe confirming it is live. Pricing is clearly documented ($0.01/call via x402). Minor deduction because no crawled documentation pages were reachable beyond the root health check, and example response is inferred from schema rather than captured live.
Warnings
- —No external documentation pages were accessible (docs, pricing, README all returned 404-like errors)
- —Example response is constructed from OpenAPI schema, not from a live API call
Citations
- —Orderbook data is polled from the Polymarket CLOB API every ~60 seconds with MD5 change detectionhttps://api.nansen.ai
- —Endpoint costs $0.01 per call via x402 protocol, or 10 credits (free) / 1 credit (pro)https://api.nansen.ai
- —Full OpenAPI 3.1.0 schema available for Nansen API v1https://api.nansen.ai