Skip to main content

Last updated: March 2026

How to Use Polymarket Data APIs

Polymarket exposes several public APIs that give you full programmatic access to market data, orderbooks, trade history, and portfolio positions. This guide covers the three main APIs — CLOB, Gamma, and Data — explains what each one does, and shows you how to start pulling data immediately.

01.Polymarket's Three Main APIs

Polymarket provides three distinct APIs, each serving a different purpose. Understanding which one to use is the first step.

  • CLOB API (Central Limit Orderbook): real-time orderbook data, order placement, fills, and market prices. Use this for trading bots and live price feeds.
  • Gamma API: market metadata, events, conditions, resolution data, and market discovery. Use this to list markets, get event details, and understand resolution criteria.
  • Data API: historical trade data, portfolio positions, PnL, and user activity by wallet address. Use this for analytics and personal portfolio tracking.

02.Getting Started — No API Key Required

Most Polymarket API endpoints are public and require no authentication. You can start querying immediately.

  • CLOB API base URL: https://clob.polymarket.com — no key needed for public market data.
  • Gamma API base URL: https://gamma-api.polymarket.com — markets, events, and conditions are all public.
  • Data API base URL: https://data-api.polymarket.com — trade history and positions are public.
  • For order placement via CLOB, you need a signing key derived from your wallet.

03.Common Requests and What They Return

Here are the most useful endpoints for each API.

  • GET /markets (Gamma) — returns all active markets with title, question, end date, and conditions.
  • GET /book?token_id=X (CLOB) — returns the current orderbook (bids and asks) for a market token.
  • GET /last-trade-price?token_id=X (CLOB) — returns the most recent trade price.
  • GET /activity?user=0xWALLET (Data) — returns trade history for a wallet address.
  • GET /positions?user=0xWALLET (Data) — returns current open positions and unrealized PnL.

04.SDKs and Wrappers

Using raw HTTP requests works, but SDKs and community wrappers reduce boilerplate and handle authentication and WebSocket reconnection for you.

  • Official Python client: py-clob-client — handles CLOB API authentication, order signing, and REST requests.
  • TypeScript clients: multiple community libraries wrap the CLOB and Gamma APIs for Node.js.
  • Community wrappers: search PolyCatalog for SDKs tagged "python", "typescript", "clob-api", or "gamma-api".

05.Rate Limits and Best Practices

Polymarket APIs are public but not unlimited. Following best practices keeps your application reliable.

  • Cache responses where possible — market metadata changes slowly; orderbooks change fast.
  • Use WebSocket connections for real-time price data instead of polling the REST endpoints.
  • Respect rate limits — aggressive polling can get your IP rate-limited.
  • Store API responses locally for historical analysis to avoid re-fetching the same data.

Related Pages

Frequently Asked Questions

Is the Polymarket API free to use?
Yes. All Polymarket public APIs are free to access. There is no pricing tier or API key purchase required. Rate limits apply to prevent abuse.
Can I stream real-time price data?
Yes. The CLOB API supports WebSocket connections for real-time orderbook and trade event streaming. This is much more efficient than polling for live price feeds.
Which API do I need for building a trading bot?
Trading bots primarily need the CLOB API (for order placement and live prices) and optionally the Gamma API (for market discovery). The Data API is useful for tracking bot performance and positions.
Where is the official Polymarket API documentation?
Official docs are maintained by the Polymarket team. Community SDKs listed on PolyCatalog often have their own documentation that covers practical usage patterns beyond what the official docs include.