Skip to main content
HomeBlog › Prediction Market APIs for Developers: Access Live Market Data & Order Books
Sports

Prediction Market APIs for Developers: Access Live Market Data & Order Books

PolyGram and Polymarket provide REST and WebSocket APIs for prediction market data. Build trading bots, analytics tools, and dashboards with live CLOB data.

Priya Anand
Sports Editor — Odds & Form · 1 May 2026 · 2 min read

Forecasting applications, quantitative trading strategies, and financial research increasingly rely on prediction market data. The Polymarket CLOB and PolyGram platform together offer developers robust APIs to integrate with the world's most active prediction market infrastructure.

Available APIs

Polymarket Gamma API (Market Data)

Market metadata, pricing information, and historical records are accessible via the Gamma REST API:

  • Base URL: https://gamma-api.polymarket.com
  • Endpoints: /events, /markets, /positions, /activity
  • Authentication: None required for public market data
  • Rate limits: ~100 requests/minute for unauthenticated access

Polymarket CLOB API (Order Book & Trading)

Real-time order book snapshots and order placement functionality are delivered through the CLOB API:

  • Base URL: https://clob.polymarket.com
  • Endpoints: /book, /trades, /orders, /prices/history
  • WebSocket: wss://ws-subscriptions-clob.polymarket.com for real-time updates
  • Authentication: ECDSA-signed requests required for order submission

PolyGram API

PolyGram offers its own dedicated API layer for authenticated trading workflows:

  • See full documentation at PolyGram API Docs
  • REST endpoints for trade placement, portfolio data, and market browse
  • API key authentication for programmatic trading

Common Developer Use Cases

  • Algorithmic trading: Automated position management based on external signals
  • Research dashboards: Historical probability tracking for election or economic forecasts
  • Market aggregators: Comparing prediction market prices across platforms
  • Embedded widgets: Show live prediction market odds on news sites or blogs
  • Alert systems: Notify when a market moves beyond a threshold

Getting Started: Fetch Market Data

Below is a simple Python snippet to retrieve current events:

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

FAQ

Is the Polymarket API free to use?
Yes — market data (Gamma API) is free with rate limits. Order submission (CLOB API) requires a funded wallet and ECDSA authentication but has no additional fees.
Can I paper trade with the API before risking real USDC?
Polymarket doesn't have a sandbox environment. Use Manifold Markets API for paper trading, then transition to Polymarket/PolyGram CLOB for live trading.
Are there Python or JavaScript SDKs available?
The community has developed unofficial Python and JS libraries for Polymarket. Search GitHub for "polymarket-py" and "polymarket-js" for the latest maintained options.
Priya Anand
Sports Editor — Odds & Form

Priya benchmarks sports prediction-market lines against traditional sportsbooks. Specialism: Premier League, NBA, and the major European cup competitions.