API referencev2

Prediction Markets API.

Live JSON and CSV access to every widget on PredictionMarketsPicks — Kalshi and Polymarket data, plus The 7 Oracles' Monte Carlo simulations for the World Cup. Free tier needs no signup. Pro and Enterprise unlock per-key rate limits and origin allowlisting.

Quickstart

Fetch the latest US recession probability payload:

curl https://predictionmarketspicks.com/api/public/recession-tracker

Add your API key for the higher Pro / Enterprise limits:

curl -H "X-API-Key: pmp_v2_pro_..." \
  https://predictionmarketspicks.com/api/public/recession-tracker

Endpoints

GET/api/public/[slug]

JSON payload for any widget V2 slug. Returns latest snapshot, deduplicated by outcome.

curl -H "X-API-Key: pmp_v2_pro_..." \
  https://predictionmarketspicks.com/api/public/recession-tracker
GET/api/public/[slug]?format=csv

Same payload as JSON, encoded as CSV with a Content-Disposition attachment header. Browser-friendly download.

curl -H "X-API-Key: pmp_v2_pro_..." \
  "https://predictionmarketspicks.com/api/public/sp500-forecast?format=csv" -o sp500.csv
GET/embed/[slug]/[variant]

HTML embed (iframe-friendly). Supports ?theme=parchment|indigo and ?key=... for tier upgrades.

<iframe src="https://predictionmarketspicks.com/embed/recession-tracker/hero?key=pmp_v2_pro_..."
  width="560" height="300" loading="lazy"></iframe>

Authentication

Pass your API key as an X-API-Key header on every request. Query-string keys (?api_key=) are accepted only on the CSV format for browser-download convenience — JSON requests reject them so plaintext keys never end up in shared access logs.

An unrecognized key silently falls back to free-tier IP limits — a typo never breaks a CSV download of public data, but you pay the lower quota. Manage keys at /account/keys.

Tiers & rate limits

TierPricePublic API limitAttributionOrigin allowlist
Free$060 req/hr per IPRequiredUnlimited
Pro$14.99/mo5,000 req/hr per keyRequired on embeds1 primary
Enterprise$499/mo100,000 req/hr per keyNot requiredUp to 10

Embed limits are separate and higher: free 600/hr per IP + 10k/hr per origin, Pro 50,000/hr per key, Enterprise 500,000/hr per key with a 5M-renders/mo fair-use cap reviewed monthly.

JavaScript example

async function getRecessionOdds() {
  const res = await fetch('https://predictionmarketspicks.com/api/public/recession-tracker', {
    headers: { 'X-API-Key': process.env.PMP_API_KEY },
    next: { revalidate: 60 }, // cache server-side for 60s
  })
  if (!res.ok) throw new Error(`PMP ${res.status}`)
  return res.json()
}

Origin allowlisting (Enterprise)

Lock an Enterprise key to specific hostnames so a leaked key from one site can't be replayed from another. Add up to 10 hostnames in /account/keys; requests from any other origin get a 403. An empty allowlist disables enforcement.

Enforcement key on the embed route: WIDGET_V2_ENFORCE_ORIGINS=1 (operator-controlled). Default-off for 48h post-launch so a misconfigured key never black-holes a customer.

Error codes

StatusMeaningWhat to do
400Malformed request — bad slug, query param on JSON path, or invalid originFix the request shape; see the endpoint reference
401Not used on the public API (free tier never rejects on auth)N/A
403Origin allowlist mismatch on an Enterprise key with origins setAdd the origin in /account/keys or remove the allowlist
404Unknown slugCheck /widgets for the live catalog of supported slugs
429Rate limit exceededBack off until Retry-After; increase cache TTL; upgrade tier
500Server error — payload lookup failedRetry with exponential backoff; check status if persistent

Available slugs

Every widget on /widgets is also an API slug.

FAQ

Which prediction markets are covered?

Kalshi is the primary source across most widgets (recession, Fed rates, inflation, S&P 500, elections, government shutdown). Polymarket provides secondary signal where Kalshi liquidity is thin. World Cup data combines Kalshi outright markets with The 7 Oracles' Monte Carlo simulation.

How do I get an API key?

Subscribe to Pro ($14.99/mo) or Enterprise ($499/mo). Two keys (Primary + Backup) are provisioned automatically and emailed at checkout. Manage them at /account/keys.

What's the difference between Pro and Enterprise?

Pro lifts you off the free tier (50,000/hr on embeds, 5,000/hr on the JSON+CSV API) but the "Powered by The 7 Oracles" attribution bar stays. Enterprise removes attribution, raises the public-API limit to 100,000/hr, and adds origin allowlisting + priority support.

How often is the data updated?

Most widget payloads refresh every 5 minutes. Macro feeds (Fed, inflation) update at FOMC and BLS release windows. World Cup match data refreshes hourly outside game days, every 5 minutes during the tournament.

Can I cache API responses on my side?

Yes — and you should. Responses include public Cache-Control: s-maxage=60. Caching for at least 60 seconds eliminates 90%+ of redundant requests against your quota.

What happens when I hit the rate limit?

A 429 response with X-RateLimit-Limit, X-RateLimit-Remaining, and a Retry-After header. The current window resets per the sliding-window algorithm — back off until the Retry-After deadline passes.

Can I redistribute the data?

Aggregate display (charts, tables, dashboards) is permitted on all tiers. Mass re-syndication (selling the raw feed to third parties) requires a separate agreement — email predictionmarketspicks@gmail.com.

Ready to build?

Free tier needs no signup. Upgrade when you need per-key limits.