Back to Blog
Polymarket API Guide: Gamma, CLOB & Data API (2026)
Guidepolymarket apipolymarket api documentationpolymarket gamma apipolymarket clob apidoes polymarket have an apipolymarket api keypolymarket api rate limits

Polymarket API Guide: Gamma, CLOB & Data API (2026)

Everything you need to use the Polymarket API — Gamma, CLOB, and Data API endpoints, authentication, rate limits, WebSockets, and Python examples.

July 16, 2026Last Updated: July 16, 20265 min readJoseph Francia

Yes, Polymarket has an API — three of them, actually. Market data is completely free and requires no API key, no authentication, and no wallet. But the documentation is spread across three separate services with different base URLs, and figuring out which one you need is half the battle.

This guide covers all three Polymarket APIs, how they fit together, and working code to get you pulling live odds in under five minutes.



The Three Polymarket APIs at a Glance

Polymarket splits its API surface into three services:

APIBase URLWhat it's forAuth required
Gamma APIgamma-api.polymarket.comDiscovering events and markets, search, tagsNone
CLOB APIclob.polymarket.comPrices, order books, spreads, price history, tradingNone for data; wallet auth for trading
Data APIdata-api.polymarket.comUser positions, trade history, holders, open interestNone

The mental model: Gamma tells you what exists, CLOB tells you what it costs, Data tells you who's trading it.



Polymarket's Data Model: Events vs. Markets

Before you write any code, understand the two core objects:

  • An event is a top-level question, like "Who will win the 2028 Presidential Election?" It contains one or more markets.
  • A market is a specific tradable binary outcome within that event — e.g., "Will Gavin Newsom win?" Each market maps to a pair of CLOB token IDs (one for Yes, one for No).

A market's outcomes and outcomePrices arrays map 1:1, and prices are implied probabilities:

{
  "outcomes": "[\"Yes\", \"No\"]",
  "outcomePrices": "[\"0.20\", \"0.80\"]"
}

Index 0 means Yes is trading at 20¢ — a 20% implied probability. Note that both fields are JSON-encoded strings, not native arrays. You'll need to parse them (a common gotcha).



Gamma API: Finding Events and Markets

The Gamma API is where every integration starts. Key endpoints:

EndpointDescription
GET /eventsList events with filtering and pagination
GET /events/{id}Single event by ID
GET /marketsList markets with filtering and pagination
GET /markets/{id}Single market by ID
GET /public-searchSearch events, markets, and profiles
GET /tagsRanked tags/categories

No key needed:

curl "https://gamma-api.polymarket.com/events?limit=5&active=true&closed=false"

In Python:

import requests

resp = requests.get(
    "https://gamma-api.polymarket.com/events",
    params={"limit": 10, "active": "true", "closed": "false", "order": "volume", "ascending": "false"},
)
for event in resp.json():
    print(event["title"], "-", event.get("volume"))


CLOB API: Prices, Books, and History

Once you have a market's CLOB token ID, the CLOB API gives you live pricing:

EndpointDescription
GET /pricePrice for a single token
GET /pricesPrices for multiple tokens
GET /bookOrder book for a token
POST /booksOrder books for multiple tokens
GET /prices-historyHistorical price data
GET /midpointMidpoint price
GET /spreadBid/ask spread
import requests

token_id = "YOUR_CLOB_TOKEN_ID"  # from the market object's clobTokenIds field
book = requests.get("https://clob.polymarket.com/book", params={"token_id": token_id}).json()
print("Best bid:", book["bids"][0], "Best ask:", book["asks"][0])

A market is tradable via the CLOB when enableOrderBook is true on the market object.



Data API: Positions, Trades, and Whales

The Data API exposes on-chain activity:

EndpointDescription
GET /positions?user={address}Current positions for a wallet
GET /activity?user={address}On-chain activity for a wallet
GET /tradesTrade history
GET /holdersTop holders of a market
GET /oiOpen interest

This is the raw feed behind "whale watching" — if you want pre-computed smart money signals instead of building wallet tracking from scratch, that's exactly what Prediction Hunt's Smart Money feed and WebSocket channel provide.



Do You Need a Polymarket API Key?

For market data: no. All three read APIs are public.

For trading: yes, sort of. Placing orders through the CLOB requires wallet-based authentication — you derive API credentials from your Polygon wallet's private key using the official py-clob-client library, and you'll need USDC on Polygon with token allowances set. Trading is where most of the complexity (and most of the "polymarket api key" confusion) lives. See our Polymarket trading bot tutorial for the full walkthrough.



Polymarket API Rate Limits

Polymarket enforces per-endpoint rate limits that vary by service and can change — check the official docs for current numbers before going to production. Practical tips that hold regardless:

  • Batch requests where endpoints support it (GET /prices, POST /books) instead of looping single calls.
  • Use the WebSocket feed for live prices rather than polling REST.
  • Cache Gamma metadata (event/market structure changes far less often than prices).


WebSockets: Streaming Instead of Polling

Polymarket offers a WebSocket service for real-time CLOB updates (order book changes, price updates, trades). For a bot or dashboard, streaming is strictly better than polling: lower latency, no rate limit pressure.



The Catch: Polymarket Is Only One Platform

Here's the thing about building on the Polymarket API directly — the moment you want context, you're integrating again. Is 42¢ for Trump on Polymarket a good price? You can't know without also checking Kalshi, PredictIt, and the rest. Each has its own API, auth scheme, data model, and naming conventions (presidential-2028 on Polymarket is PRES-2028-DEM on Kalshi is #8102 on PredictIt).

That's the problem the Prediction Hunt API solves: one API, 6 platforms, with cross-platform entity resolution built in — the same event automatically matched across every platform:

curl -H "X-API-Key: YOUR_API_KEY" \
  "https://prediction.com/api/v2/search?q=presidential+election"

One call returns the same market's price on Polymarket, Kalshi, PredictIt, ProphetX, and more, so you can spot the best price (or an arbitrage gap) instantly. The free tier includes 1,000 requests/month with no credit card.


Want Polymarket, Kalshi, PredictIt, and 3 more platforms in a single API call? Get a free Prediction Hunt API key — 1,000 requests/month, no credit card required.

Frequently Asked Questions

Does Polymarket have an official API?

Yes. Market data is free via the Gamma, CLOB, and Data APIs with no authentication. Trading requires wallet-based auth.

Is the Polymarket API free?

Yes, for reading data. There are no paid tiers for market data — just rate limits.

Where is the official Polymarket API documentation?

docs.polymarket.com. This guide consolidates the essentials; the official docs have full parameter schemas.

How do I get Polymarket historical data?

The CLOB API's /prices-history endpoint returns historical prices per token, and the Data API's /trades returns trade history. For cross-platform historical data, the Prediction Hunt API's /api/v2/prices/history endpoint returns OHLC candles across Polymarket, Kalshi, and more.

Can I build a trading bot with the Polymarket API?

Yes — via the CLOB API and py-clob-client. Placing orders requires wallet-based authentication with API credentials derived from your Polygon wallet's private key, plus USDC on Polygon with token allowances set.

Build with this data

Automate your strategies, create arb bots, or build your own dashboard. Free tier includes 1,000 requests/mo across all prediction market platforms.

Related Posts