Polymarket's market data is free to read through three public REST APIs and a WebSocket, with no account or API key: the Gamma API lists events and markets, the CLOB API gives prices, order books and price history, and the Data API gives trades, positions, holders, open interest and leaderboards. On Nimb, every number on the map comes from these same endpoints, checked on 8 November 2026.
Which Polymarket API do I need for data?
Pick by the question you are asking. All base URLs below are from Polymarket's API overview.
| You want | API | Base URL | Key needed |
|---|---|---|---|
| Events, markets, rules, volumes, end dates | Gamma | https://gamma-api.polymarket.com | No |
| Best price, midpoint, spread, order book | CLOB | https://clob.polymarket.com | No (yes to trade) |
| Price history | CLOB or Data API | /prices-history | No |
| Trades, positions, holders, open interest, P&L, leaderboards | Data API | https://data-api.polymarket.com | No |
| Live prices and book updates | WebSocket market channel | wss://ws-subscriptions-clob.polymarket.com/ws/market | No |
| Your own orders and fills | WebSocket user channel, CLOB | /ws/user | Yes |
Two identifiers matter. A market's condition ID names the question; each outcome has a token ID (the Yes share and the No share are separate tokens). Gamma returns both: conditionId and clobTokenIds, in the same order as outcomes.
How do I get a market's price and order book?
- List open events, most traded first:
GET https://gamma-api.polymarket.com/events?active=true&closed=false&order=volume24hr&ascending=false&limit=20. For more than a few thousand results use the keyset endpoint/events/keysetand follownext_cursor; plainoffsetpaging is capped. - Best price to buy a Yes share:
GET https://clob.polymarket.com/price?token_id=<token>&side=BUY. Midpoint and spread:/midpointand/spreadwith the sametoken_id. - The full order book:
GET https://clob.polymarket.com/book?token_id=<token>. Bids and asks are prices from 0 to 1 with sizes in shares. See spread and order book depth for how to read it.
How do I get price history?
Two endpoints return the same kind of series, oldest first:
- CLOB:
GET https://clob.polymarket.com/prices-history?market=<token>&interval=max&fidelity=60returns{"history":[{"t":…,"p":…}]}, withfidelityin minutes. - Data API v2:
GET https://data-api.polymarket.com/v2/prices-history?token_id=<token>&interval=max&bucket_seconds=86400, or a fixed range withstartandendin Unix seconds.
More on gaps, resolution and downloading in Polymarket historical data.
How do I get open interest, holders and trades?
| Data | Request (Data API v2) |
|---|---|
| Open interest of a market | /v2/oi?condition=<conditionId> |
| Top holders per outcome | /v2/holders?condition=<conditionId>&limit=20 |
| Recent trades in a market | /v2/trades?condition=<conditionId>&limit=100 |
| A wallet's open positions | /v2/positions?user=<address> |
| A wallet's P&L over time | /v2/user-pnl?user=<address>&interval=1m&fidelity=1d |
| Leaderboard by P&L or volume | /v2/leaderboard?time_period=month&limit=50 |
| Biggest resolved winners | /v2/biggest-winners?time_period=week |
Responses share one envelope: results under data, and a pagination object with has_more and next_cursor. Polymarket documents a migration from the original Data API routes to v2; older tutorials that call routes without /v2 may stop working.
Is there a Polymarket API for Python?
Yes. Polymarket publishes unified TypeScript and Python SDKs that wrap these APIs, and the public reads work without credentials (Python SDK). For simple reads, plain HTTP is enough; this is the whole of a working example:
import json, urllib.requesturl = "https://gamma-api.polymarket.com/events?active=true&closed=false&order=volume24hr&ascending=false&limit=5"for e in json.load(urllib.request.urlopen(url)): print(e["title"], round(e["volume24hr"]))
Trading through the API is different: it needs a wallet, signed orders and API credentials, and it is subject to the same country restrictions as the website. See who can trade.
What does Nimb add on top of the API?
Nimb reads the same public endpoints and does the joining for you: as of 8 November 2026, 18:00 UTC, 313 active events and 1061 outcomes with 30 days of hourly prices, holders with hedged positions netted out, themes, links between markets and a free CSV snapshot. Start at Polymarket analytics or download markets.csv. How Nimb fetches and refreshes data is in data sources and freshness.
What this cannot tell you
- The APIs give prices and positions, not reasons. A price move without news is still a move you have to explain.
- Gamma's
liquidityfield is order-book depth, not open interest. Use/v2/oifor open interest. - Endpoints, limits and field names change; Polymarket's docs are the source of truth. Check them before you build on a detail here.
Frequently asked questions
Is the Polymarket API free?
Yes, reading market data is free and needs no key. Polymarket applies rate limits; heavy users should cache responses and use the WebSocket for live prices instead of polling.
Do I need an API key to read prices?
No. Keys (API credentials derived from a wallet signature) are needed only to place and manage orders.
Does the API give open interest?
Yes, per market, from the Data API: /v2/oi?condition=<conditionId>.
Is there a Polymarket WebSocket?
Yes. The public market channel at wss://ws-subscriptions-clob.polymarket.com/ws/market streams book and price updates for the token IDs you subscribe to. Nimb's map uses it for live prices.
What is the best prediction market data API?
For Polymarket, its own public APIs: they are the primary source and free. Other venues have their own; Kalshi, for example, publishes a market-data API. Aggregators save work but add a layer you have to trust.
Last reviewed 8 November 2026 · Data from Polymarket · Not financial advice · Nimb is not affiliated with Polymarket.