Public API v1
Prediction Market API for Kalshi and Polymarket
One REST API for Kalshi and Polymarket. Search events, read every venue's price for the same question side by side, see how fresh each price is, pull price history, and stream live quotes over a WebSocket.
Start here
- QuickstartGet a key and read your first event in curl, Python or JavaScript in five minutes.
- Core conceptsEvents, markets, outcomes, contracts and venues explained with real examples.
- API referenceEvery v1 endpoint with parameters, samples, responses and errors.
- Live quotes WebSocketSubscribe to price changes instead of polling.
- Connect an AI assistantAdd TPM to Claude, ChatGPT, Perplexity, Grok or Cursor with one URL. No key needed.
- GuidesCompare an event across venues, map a venue link, track live prices.
- ChangelogWhat shipped in v1 and how the API will change over time.
Your first request
This lists the three busiest events. It uses the public demo key, so you can paste it into a terminal right now.
Request
curl -s 'https://api.thepredictionmarkets.com/api/public/v1/events?sort=volume&limit=3' \
-H 'X-API-Key: tpm_demo_key_authorized_2026'Next, get your own free key and follow the quickstart.
What you can build
- Odds comparison. Show Kalshi and Polymarket prices for the same outcome side by side with
/events/{slug}. - Link translation. Turn a Kalshi link into its Polymarket twin, or the reverse, with
/matches. - Gap scanners. Rank outcomes where one venue is cheaper than the other with
/spreads. - Charts. Draw price history with
/events/{slug}/history. - Bots and dashboards. Keep prices current with the WebSocket and bulk
/prices.
Base URL and spec
| What | Where |
|---|---|
| REST base URL | https://api.thepredictionmarkets.com/api/public/v1 |
| WebSocket | wss://api.thepredictionmarkets.com/api/public/v1/stream |
| Interactive reference | Open Swagger UI |
| OpenAPI 3 spec | Download openapi.json |
| MCP server (AI assistants) | https://api.thepredictionmarkets.com/mcp (setup) |
Stable by design
v1 only grows. We add fields and endpoints but never rename or remove them. A breaking change would ship as /api/public/v2, with notice. See the changelog.
Related
Build with TPM
Get your free API key
One key gives you Kalshi and Polymarket events, prices with freshness, price history, cross-venue gaps and the live quotes WebSocket.