Market intelligence from prediction platforms has become essential for algorithmic research, systematic trading strategies, and instantaneous decision-making systems. PolyGram and the underlying Polymarket CLOB infrastructure offer 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 API delivers event information, current valuations, and time-series data:
- Base URL: https://gamma-api.polymarket.com
- Endpoints: /events, /markets, /positions, /activity
- Authentication: No credentials required for open market data
- Rate limits: ~100 requests/minute for unauthenticated access
Polymarket CLOB API (Order Book & Trading)
The CLOB API delivers instantaneous order book snapshots and trade execution 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-signed requests required for placing orders
PolyGram API
PolyGram provides its own interface for authenticated market operations:
- See full documentation at PolyGram API Docs
- REST endpoints for order placement, account holdings, and market discovery
- API key authentication for automated trading workflows
Common Developer Use Cases
- Algorithmic trading: Systematic position adjustment driven by proprietary data sources
- Research dashboards: Temporal probability analysis for political or macroeconomic outcomes
- Market aggregators: Cross-platform odds comparison and arbitrage identification
- Embedded widgets: Display current prediction odds within editorial or informational platforms
- Alert systems: Trigger notifications when market conditions breach specified parameters
Getting Started: Fetch Market Data
A straightforward 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?
- Absolutely — market data (Gamma API) is available at no cost subject to rate restrictions. Submitting orders (CLOB API) requires a wallet with USDC funding and ECDSA authentication, though no service charges apply.
- Can I paper trade with the API before risking real USDC?
- Polymarket does not offer a test environment. Explore Manifold Markets API for simulated trading, then migrate to Polymarket/PolyGram CLOB once ready for production activity.
- Are there Python or JavaScript SDKs available?
- Community contributors have released third-party Python and JavaScript libraries for Polymarket. Check GitHub repositories for "polymarket-py" and "polymarket-js" to locate actively maintained versions.