Market intelligence from prediction platforms has become essential for quantitative analysis, algorithmic trading strategies, and instantaneous market forecasting. PolyGram and the Polymarket CLOB infrastructure provide robust APIs enabling developers to construct applications atop the world's most active prediction market network.
Available APIs
Polymarket Gamma API (Market Data)
The Gamma REST interface delivers event details, real-time pricing, and time-series market information:
- 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 interface supplies live order-book snapshots and transaction routing 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 offers its proprietary interface for verified 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
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?
- Absolutely — market intelligence via the Gamma API carries no cost, subject to throttling thresholds. Transaction submission through the CLOB API demands a wallet with available funds and cryptographic signing, though no supplementary charges apply.
- Can I paper trade with the API before risking real USDC?
- Polymarket does not offer a test environment for non-production work. Explore Manifold Markets API for simulated trading, then move to Polymarket/PolyGram CLOB when prepared for capital deployment.
- 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.