Forecasting platforms and quantitative analysis increasingly depend on real-time prediction market data. PolyGram, built atop the Polymarket CLOB infrastructure, offers robust APIs enabling developers to construct applications leveraging the world's most active prediction market network.
Available APIs
Polymarket Gamma API (Market Data)
The Gamma REST API delivers event information, pricing details, and time-series market records:
- 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)
The CLOB API furnishes live order book snapshots and order placement capabilities:
- 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 provides its proprietary API 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: Systematic position adjustment triggered by external data feeds
- Research dashboards: Temporal probability analysis across electoral and macroeconomic events
- Market aggregators: Price discovery across multiple prediction market venues
- Embedded widgets: Display current prediction market quotations on publisher platforms
- Alert systems: Trigger notifications upon significant market movements
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?
- 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.