Developer·January 25, 2026·6 min read

Polymarket API Guide: API Key, CLOB Data, Bots, and Market Odds

Learn how to use the Polymarket API, get API key context, read CLOB market data, track odds, and decide when a trading bot is worth building.

Polymarket API Guide: API Key, CLOB Data, Bots, and Market Odds

Polymarket provides APIs for accessing prediction market data programmatically. Here's how to get started with Polymarket's data.

API Overview

Polymarket offers several ways to access data:

  • REST API: Fetch market data, prices, and order books
  • WebSocket: Real-time price updates
  • GraphQL: Query historical data
  • Subgraph: On-chain data via The Graph

Common Data Points

  • Market list: All active prediction markets
  • Current prices: Yes/No prices for each outcome
  • Order books: Bid/ask depth
  • Historical prices: Price charts over time
  • Volume: Trading activity per market

Common Use Cases

  • Price tracking: Monitor odds across markets
  • Arbitrage detection: Compare Polymarket to other platforms
  • Data analysis: Historical accuracy research
  • Trading bots: Automated market making
  • Visualizations: Build custom election maps

Getting Started

Check Polymarket's documentation and GitHub for the latest API specifications. The API is generally permissive for read operations.

How to get a Polymarket API key

API-key intent usually means one of two things: you want public market data, or you want authenticated trading access. Public market data can often be read without the same permissions needed for order placement. Trading requires wallet-connected credentials and request signing. Keep API secrets, passphrases, and private keys out of source control.

If your search is "how to get Polymarket API key," start by deciding whether you need read-only market data, CLOB order-book access, or authenticated trading. Most research workflows only need prices, market metadata, volume, and historical movement. Trading-bot workflows need stricter key handling, position limits, and failure controls.

CLOB API, order books, and trading bots

The CLOB API is the important layer for developers who care about execution. It exposes order-book depth, bids, asks, token IDs, and market structure. A bot that only reads the last traded price is incomplete because it does not know whether the price is actually fillable.

Before building a Polymarket trading bot, verify:

  • Liquidity: enough depth exists at the price your strategy expects.
  • Spread: the bid-ask gap does not erase the edge.
  • Resolution rules: the bot knows what the contract actually asks.
  • Rate limits: polling and order placement stay inside allowed usage.
  • Kill switch: the bot can cancel orders and stop trading after errors.

For a full execution walkthrough, read the Polymarket trading bot tutorial. If you want the same developer lens on Kalshi, compare it with the Kalshi API guide and Kalshi trading bot GitHub guide.

Use Alphascope for Aggregated Data

Don't want to build your own integration? Alphascope aggregates data from Polymarket and Kalshi:

Frequently Asked Questions

Does Polymarket have an API?

Yes, Polymarket offers REST, WebSocket, and GraphQL APIs for accessing market data programmatically.

Is the Polymarket API free?

Polymarket's public data APIs are generally free for read operations. Check their documentation for rate limits.

Can I build a trading bot for Polymarket?

Yes, the API supports programmatic trading. You'll need to connect a wallet and use their trading endpoints.

How do I get a Polymarket API key?

Start with Polymarket's current developer documentation and separate read-only market-data access from authenticated trading credentials. Never commit API secrets, passphrases, or wallet private keys.