Get started
Quickstart
Three steps: get a key, check the API is up, then find an event and read its prices on every venue. Five minutes, no SDK needed.
1. Get an API key
- Sign in and open API keys.
- Click Generate Key. Every account gets one free key.
- Copy the key and keep it on your server, for example in an environment variable called
TPM_API_KEY.
Just looking?
Use the demo key tpm_demo_key_authorized_2026. Everyone shares it, it is limited to 5 requests per second, and it cannot open the WebSocket. Details in authentication.
2. Check the API is up
/status needs no key and does not count against your quota.
Request
curl -s 'https://api.thepredictionmarkets.com/api/public/v1/status'3. Find an event and read its prices
An event is one real-world question, like who will be the Democratic nominee in 2028. Search with /events, take a slug, then call /events/{slug}.
Full script
export TPM_API_KEY=tpm_demo_key_authorized_2026 # replace with your own key
# 1. Is the API up? (no key needed)
curl -s https://api.thepredictionmarkets.com/api/public/v1/status
# 2. Find an event
curl -s 'https://api.thepredictionmarkets.com/api/public/v1/events?q=nominee&limit=3' \
-H "X-API-Key: $TPM_API_KEY"
# 3. Read every venue's prices for it
curl -s https://api.thepredictionmarkets.com/api/public/v1/events/democratic-presidential-nominee-2028 \
-H "X-API-Key: $TPM_API_KEY"The Python script prints something like this (prices change all the time):
Output
Democratic Presidential Nominee 2028 ['kalshi', 'polymarket']
kalshi Jon Ossoff 0.16 (live)
kalshi Gavin Newsom 0.16 (live)
kalshi Alexandria Ocasio-Cortez 0.14 (live)
polymarket Alexandria Ocasio-Cortez 0.1645 (fresh)
polymarket Gavin Newsom 0.1635 (fresh)
polymarket Jon Ossoff 0.1475 (fresh)How to read the response
marketshas one entry per venue listing. Here: KalshiKXPRESNOMD-28and the Polymarket event of the same name.- Each market has
outcomes. Each outcome has aquotewhoseprobabilityis a price from 0 to 1. 0.16 means the market gives that answer a 16% chance. quote.freshnesstells you how current the price is.liveandfreshare safe to show; treatstalewith care. See freshness.- Outcomes with the same
match.group_idare the same answer on different venues.spreadslists the gap between venues for each matched outcome.
Next steps
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.