Skip to main content
Get prediction market data in three steps: get an API key, list available exports, then download the files you need.

1. Get an API key

Polymarket data is available self-serve — sign up at predictiondata.dev to get an API key. For Kalshi data, contact calder@predictiondata.dev. You’ll need the key for downloading (and for all Kalshi calls). Listing Polymarket exports does not require a key.

2. List available exports

Which step you use depends on the exchange.

Polymarket

No API key needed to list. List exports by event slug (easiest — one call for all markets in an event):
curl "https://api.predictiondata.dev/v1/exports/polymarket/events/super-bowl-champion-2026-731"
You get back a JSON object with exports.books, exports.trades, and exports.onchain, each containing file metadata (e.g. asset_id, date, filename). See Finding Available Files for market slug and asset ID options.

Kalshi

List exports by ticker (e.g. “New England to win the Super Bowl” → ticker KXSB-26-NE):
curl -H "x-auth-token: YOUR_API_KEY" \
  "https://api.predictiondata.dev/v2/exports/kalshi/tickers/KXSB-26-NE"
The response is an array of export objects with path, day, exportType, fileFormat, fileSizeBytes, and other metadata.

3. Download a file

Polymarket

You can download by asset ID or by market slug + outcome. Use the date from the list response. By asset ID:
curl -G "https://datasets.predictiondata.dev/polymarket/books/ASSET_ID/DATE.csv.gz" \
  --data-urlencode "apikey=YOUR_API_KEY" \
  --output books.csv.gz
By market slug + outcome (YES/NO) — add slug=true:
curl -G "https://datasets.predictiondata.dev/polymarket/books/MARKET_SLUG/YES/DATE.csv.gz" \
  --data-urlencode "slug=true" \
  --data-urlencode "apikey=YOUR_API_KEY" \
  --output books.csv.gz
See Finding Available Files for more details.

Kalshi

Use the path from the list response. The download endpoint redirects to a signed URL (valid 5 minutes). Follow the redirect with -L so curl fetches the actual file.
# path from list response: /kalshi/KXSB-26-NE/top-of-book/2026-02-03.csv.gz
curl -L -H "x-auth-token: YOUR_API_KEY" \
  "https://api.predictiondata.dev/v2/datasets/kalshi/KXSB-26-NE/top-of-book/2026-02-03.csv.gz" \
  --output data.csv.gz

Next steps