🎁 New traders: 100% Deposit Match up to $500 · 0% fees · instant USDC payoutsClaim it →
Skip to main content
HomeBlog › Prediction Market APIs for Developers: Access Live Market Data & Order Books
Guide

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.

James Carlton
Crypto Analyst — On-Chain Flows · · 2 min read
✓ Fact-checked · 📅 Updated 1 May 2026 · 2 min read
PolyGram
Trending · Politics · Sports · Crypto
FIFA World Cup 2026
64%
BTC > $150k EOY 2026
38%
2028 Dem Nominee
52%
Trade →

Forecasting applications, quantitative trading strategies, and financial research increasingly depend on real-time prediction market data. The largest prediction market ecosystem—Polymarket and its underlying CLOB infrastructure—offers developers comprehensive APIs to construct sophisticated applications on top of live market activity.

Available APIs

Polymarket Gamma API (Market Data)

Market metadata, current pricing, and historical information 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)

Order submission and real-time order book information 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

Authenticated trading operations are supported through PolyGram's dedicated API layer:

  • 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

A basic Python example to fetch live 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?
Market data access via the Gamma API carries no cost and operates under rate limits. Submitting orders through the CLOB API requires a wallet with funds and ECDSA authentication; no separate API charges apply.
Can I paper trade with the API before risking real USDC?
Polymarket lacks a sandbox or test environment. Consider Manifold Markets API for simulated trading, then migrate to Polymarket/PolyGram CLOB once ready for production.
Are there Python or JavaScript SDKs available?
Community-maintained unofficial libraries exist for Polymarket across Python and JavaScript. Look for "polymarket-py" and "polymarket-js" repositories on GitHub to find currently supported versions.
James Carlton
Crypto Analyst — On-Chain Flows

James covers DeFi research and writes for PolyGram on USDC flows, the Polymarket Polygon order book, and conditional-token mechanics.