Skip to content

spfunctions/awesome-prediction-markets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Awesome Prediction Markets Awesome

APIs, datasets, tools, and research for building on prediction markets. For developers and AI agents, not dashboards.

Prediction markets are the best real-time source of calibrated probability for world events. This list focuses on what you need to build with that data — APIs to fetch it, tools to process it, datasets to train on, and research to understand it.

Pull requests welcome. See contributing guidelines.

Open In Colab — Interactive notebook: world state, market search, trade ideas, contagion detection, and more.

Quick Start — Get a Price in 30 Seconds

# Kalshi — what are the markets?
curl -s "https://trading-api.kalshi.co/trade-api/v2/markets?limit=3" | jq '.markets[] | {title, yes_ask, volume}'

# Polymarket — current markets
curl -s "https://clob.polymarket.com/markets?limit=3" | jq '.[] | {question, tokens[0].price}'

# SimpleFunctions — scan any topic, no auth
curl -s "https://simplefunctions.dev/api/public/scan?q=oil"

# SimpleFunctions — what changed in the last hour
curl -s "https://simplefunctions.dev/api/changes"

API Comparison

Which platform fits your use case?

Kalshi Polymarket Metaculus Manifold
Auth for market data No No No No
Auth for trading API key + RSA Wallet signature N/A API key
WebSocket Yes Yes No No
Rate limit 100/min 500/min Undocumented 1000/min
Historical data Settlement CSV Subgraph + API Export Full API
Real money Yes (CFTC) Yes (USDC) No Sweepstakes
Market creation No (Kalshi only) No (UMA only) Community Anyone
Best for US regulated, macro Crypto-native, global Research, calibration Experimentation

Contents


Exchanges & Platforms

Active prediction market platforms with programmatic access.

Platform API Markets Settlement
Kalshi REST + WebSocket Economics, politics, weather, science CFTC-regulated, USD
Polymarket CLOB API Politics, crypto, global events Polygon, USDC
Metaculus API Science, technology, geopolitics Reputation-based
Manifold Markets API Anything (user-created) Play money + sweepstakes
PredictIt API US politics CFTC no-action letter, USD
Smarkets API Politics, sports, current affairs UK-regulated, GBP
Futuur API Global events Play money + real money
Insight Prediction API Global events Crypto

APIs & SDKs

Multi-Venue

  • SimpleFunctions API — Unified REST API for Kalshi + Polymarket. Thesis management, edge detection, what-if scenarios, track record feedback. Free during beta.
  • SimpleFunctions CLI — 42 terminal commands for prediction market intelligence. Scan, watch, trade, agent mode.

Kalshi

Polymarket

Metaculus

Manifold

MCP Servers

Connect LLMs to prediction market data via the Model Context Protocol.

  • SimpleFunctions MCP — 25 tools: thesis management, edge detection, market search, trading, what-if scenarios. Works with Claude Code, Cursor, Windsurf.
    claude mcp add simplefunctions --url https://simplefunctions.dev/api/mcp/mcp
  • prediction-market-mcp-example — Minimal 50-line MCP server for learning. Search markets, get context, price changes.
  • us-gov-open-data-mcp — 300+ tools across 40+ U.S. government APIs. FRED, Treasury, BLS, Congress, FDA, EPA, SEC. Selective module loading.
  • fred-mcp-server — FRED economic data for Claude/Cursor.
  • mcp-fredapi — FRED API with series search and category browsing.
  • imf-data-mcp — IMF economic data via SDMX 3.0 API.

CLI Tools

  • SimpleFunctions CLIsf scan, sf edges, sf watch, sf agent, sf intent. Covers Kalshi + Polymarket.
    npm i -g @spfunctions/cli && sf setup
  • polymarket-cli — Official Polymarket CLI for order placement.

Agent Frameworks & Examples

Building AI agents that reason over prediction market data.

Frameworks

Example Projects

Data & Datasets

Live Data

Historical Datasets

Aggregators & Cross-Venue

  • SimpleFunctions — Kalshi + Polymarket unified. Edge detection across venues.
  • MetaForecast — Aggregates Metaculus, Polymarket, Manifold, Good Judgment, and more.
  • Oddpool — Cross-venue odds, spreads, liquidity, arbitrage detection.
  • BaseRateTimes — News through the lens of prediction markets.
  • Electionbettingodds.com — Aggregated political prediction market odds.

Economic & Macro Data

The context layer for prediction markets — the economic indicators, government data, and macro signals that drive the events prediction markets trade on.

Aggregator Platforms

  • OpenBB — Open-source financial data platform (65K+ stars). Covers FRED, World Bank, BLS, Eurostat, and hundreds of other data sources. Python, CLI, and AI agent integration.
  • pandas-datareader — Extract data from FRED, World Bank, OECD, Eurostat, Stooq, and more into pandas DataFrames. The standard Python library for economic data access.
  • DBnomics — Aggregates 80+ statistical providers (central banks, national statistics offices, international organizations). R client, Julia client, Stata client. Free API, no auth.
  • findatapy — Download market data from Bloomberg, Eikon, Quandl, FRED and more via a unified interface.

FRED (Federal Reserve Economic Data)

  • fredapi — Python client for FRED. pip install fredapi. Supports series search, vintages, releases.
  • fredr — R client for FRED API. On CRAN.
  • fred-rs — Rust crate for FRED.
  • fredcpp — C++ client for FRED.
  • FredApi.jl — Julia package for FRED.
  • fredric — Ruby library and CLI for FRED.
  • fred-mcp-server — MCP server for FRED data in Claude/Cursor.
  • mcp-fredapi — Another FRED MCP server with search and category browsing.

Federal Reserve & Central Banks

  • FRB — Python client for all Federal Reserve Bank data (not just FRED — includes flow of funds, financial accounts, survey data).
  • econ_data — Python notebooks demonstrating FRED, BLS, Census, and BEA API usage with working examples.

World Bank

  • wbdata — Python library for World Bank data. Tested: pulls GDP per capita for any country/date range. No auth.
  • world_bank_data — Python library with pandas integration. Tested: pulls CPI inflation for US/CN/GB/BR. No auth.
  • WDI — R package for World Bank data. On CRAN, 250+ stars.
  • WorldBankData.jl — Julia package for World Bank data.

BLS (Bureau of Labor Statistics)

  • blscrapeR — R package for BLS data (unemployment, CPI, wages). 117 stars.
  • blsAPI — R client for BLS API. 93 stars.
  • BLS-APIs — Python wrapper for BLS v1/v2 APIs.
  • BLS API v1 requires no auth key: curl https://api.bls.gov/publicAPI/v1/timeseries/data/LNS14000000

IMF

  • IMFData — R package for IMF data. 49 stars.
  • imf-data-mcp — MCP server for IMF economic data via SDMX 3.0 API.
  • IMF API requires no auth: https://data.imf.org (SDMX 3.0)

Eurostat

  • eurostat-api-client — Python client for Eurostat data.
  • eurostat_downloader — Python tool for bulk Eurostat downloads.
  • Eurostat API requires no auth: https://ec.europa.eu/eurostat/api/dissemination/statistics/1.0/data/

Multi-Agency / Government

  • us-gov-open-data-mcp — MCP server + TypeScript SDK for 40+ U.S. government APIs (300+ tools). Covers FRED, Treasury, BLS, Census, EPA, FDA, SEC, Congress, and more. 20+ APIs need no auth key. 94 stars.

OECD

  • OECD Data API requires no auth: https://sdmx.oecd.org/public/rest/data/ (SDMX format)

Analytics & Research Tools

Tutorials & Guides

Getting Started

Building Agents

Trading Systems

Orderbooks & Market Microstructure

Edge Detection & Sizing

Strategy & Market Structure

How Prediction Markets Work

Concepts & Frameworks

Platform Comparisons

Selected Reading

Primers

Strategy & Structure

AI & Prediction Markets

Academic Papers

Project Ideas

Things you can build with the APIs and tools above.

Project Difficulty Stack
Cross-venue arbitrage detector — find price differences between Kalshi and Polymarket on the same event Medium Python + both APIs
Telegram alert bot — notify on 10%+ price moves Easy Node.js + SimpleFunctions /api/changes
Thesis-driven trading agent — create a causal model, scan for edges, auto-trade Hard LangChain + SimpleFunctions MCP
Prediction market dashboard — real-time prices, orderbook depth, historical charts Medium React + WebSocket APIs
Forecasting tournament bot — auto-submit forecasts to Metaculus/Manifold using LLMs Medium Python + OpenAI + Metaculus API
Market sentiment tracker — correlate prediction market moves with news/X sentiment Hard Python + SimpleFunctions + X API

Community


Contributing

  1. Fork this repo
  2. Add your resource to the appropriate section
  3. Keep descriptions short (one line)
  4. Include a link to source code or documentation
  5. Submit a PR

What belongs here: APIs, SDKs, datasets, code, tools, research, papers, tutorials. Things developers use to build.

What doesn't belong: Consumer dashboards, portfolio trackers, copy-trading services, news aggregators without an API. Check Awesome Prediction Market Tools for those.

License

MIT

Releases

No releases published

Packages

 
 
 

Contributors