Live prediction market information has become essential for algorithmic traders, quantitative researchers, and forecasting platforms seeking real-time insights. PolyGram and the underlying Polymarket CLOB infrastructure provide robust API access to the world's most active prediction market ecosystem.
Available APIs
Polymarket Gamma API (Market Data)
The Gamma REST API delivers event details, current pricing, and time-series information:
- Base URL: https://gamma-api.polymarket.com
- Endpoints: /events, /markets, /positions, /activity
- Authentication: Public market data requires no authentication
- Rate limits: Approximately 100 calls per minute without authentication
Polymarket CLOB API (Order Book & Trading)
The CLOB API supplies order book snapshots and order management capabilities:
- Base URL: https://clob.polymarket.com
- Endpoints: /book, /trades, /orders, /prices/history
- WebSocket: wss://ws-subscriptions-clob.polymarket.com for live streaming
- Authentication: ECDSA signature verification needed to submit orders
PolyGram API
PolyGram offers its proprietary API layer for authenticated trading workflows:
- Complete reference available at PolyGram API Docs
- HTTP endpoints supporting order execution, account information, and market discovery
- Key-based authentication for automated trading operations
Common Developer Use Cases
- Algorithmic trading: Systematic position adjustments triggered by external data sources
- Research dashboards: Temporal probability charting for political or macroeconomic events
- Market aggregators: Side-by-side pricing comparison across multiple prediction platforms
- Embedded widgets: Display current prediction market quotes within editorial or informational websites
- Alert systems: Trigger notifications when market movements exceed specified parameters
Getting Started: Fetch Market Data
A straightforward Python snippet to retrieve active 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 through the Gamma API is available at no cost subject to rate restrictions. Trading via the CLOB API requires a wallet with funds and cryptographic signing but incurs no separate API charges.
- Can I paper trade with the API before risking real USDC?
- Polymarket lacks a test environment for risk-free experimentation. Manifold Markets provides a sandbox API for paper trading; afterwards, migrate to Polymarket/PolyGram CLOB for production trading.
- Are there Python or JavaScript SDKs available?
- Community contributors have built third-party Python and JavaScript packages for Polymarket integration. Check GitHub repositories such as "polymarket-py" and "polymarket-js" to locate actively maintained versions.