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):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” → tickerKXSB-26-NE):
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:slug=true:
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.
Next steps
- Something wrong? Common problems — 404s, auth errors, date format, slug vs asset ID, and more.
- Polymarket: Datasets overview, Order Books, Trades, Onchain Fills
- Kalshi: Finding Available Files