Prediction Market API
Event data infrastructure for trading desks, risk systems, and AI agents.
The SimpleFunctions prediction market API normalizes Kalshi and Polymarket, resolves event questions into probabilities, attaches gov/econ context, and hands off stable JSON to screens, monitors, agents, and execution workflows.
Venue APIs expose markets. SimpleFunctions returns event probability state: cross-venue contracts, source context, world state, screens, and next actions.
For institutions
Use prediction markets as event-risk inputs without reconciling venues, source context, and contract metadata yourself.
For developers
Start with REST endpoints and stable JSON. Search events, fetch world state, screen markets, and expose the same surfaces through agents or MCP tools.
One API surface, four jobs
Each job maps to a callable surface, not a marketing category.
Market data
prices, orderbooks, volume, liquidity, venue identifiers, history
/api/public/market/:tickerEvent probability
natural-language questions mapped to implied odds and related contracts
/api/public/query?q=Source context
bills, nominations, economic series, tickers, releases, and market anchors
/api/public/query-gov · /api/public/query-econOperational state
world snapshots, deltas, inspection links, screens, monitors, and next actions
/api/agent/world · /api/public/indexBuilt for desks that need stable objects, not toy wrappers.
Stable identifiers
venue tickers, slugs, market ids, related events, and source links are preserved for reconciliation
Machine-readable context
government, economic, traditional market, and probability objects stay separate instead of being blended into prose
Monitoring first
world and delta endpoints let systems wake on market state changes instead of re-running broad search
Execution-aware
responses point to inspect, screen, monitor, and intent workflows without claiming brokerage or custody
Start with the workflow you need
Each surface is callable directly. Use the public endpoint for fast inspection, then promote recurring jobs into monitors, world state, or agent tools.
Search event probabilities
01/api/public/query?q=Fed%20rate%20cutdeveloper · agent
Read world state
02/api/agent/worldagent · dashboard
Wake on changes
03/api/agent/world/delta?since=1hlong-running agent
Economic context
04/api/public/query-econ?q=CPImacro · rates
Government context
05/api/public/query-gov?q=SAVE%20Actpolicy · gov affairs
Screen markets
06/api/public/screentrader · researcher
Market-wide index
07/api/public/indexagent · risk monitor
Inspect edges
08/api/edgesresearch · institution
Discover tools
09/api/toolsMCP · tool builder
Response contract
Prose is optional. The contract is the product.
Venue objects, probabilities, source context, and follow-up actions remain separate so downstream systems can reconcile them.
queryoriginal natural-language event question
kalshi[]normalized Kalshi markets with ticker, title, price, liquidity fields
polymarket[]normalized Polymarket markets with slug, title, price, volume fields
traditional[]optional market anchors such as rates, oil, equity, FX, or volatility
contextgovernment, economic, and topic-level source objects when available
nextActionsinspect, screen, monitor, related, and execution-intent handoffs
Integration path
Start with a query, promote recurring questions into monitors, and use world state or deltas when an agent needs a compact market-aware context window.
Search event probabilities
GET /api/public/query?q=Fed%20rate%20cut&limit=2Read full market state
GET /api/agent/world?format=jsonWake on changes
GET /api/agent/world/delta?since=1hDiscover agent tools
GET /api/toolsMinimal example
A compact query returns venue objects, market anchors, and follow-up actions.
GET /api/public/query?q=Fed%20rate%20cut&limit=2JSON{
"query": "Fed rate cut",
"kalshi": [{ "ticker": "KXRATECUT-26DEC31", "price": 49 }],
"polymarket": [{ "slug": "fed-rate-cuts-2026", "price": 58 }],
"traditional": [{ "symbol": "TLT", "changePct": 0.23 }],
"nextActions": {
"inspect": ["https://simplefunctions.dev/api/agent/inspect/KXRATECUT-26DEC31"],
"related": ["https://simplefunctions.dev/api/public/screen?keyword=Fed%20rate%20cut"]
}
}Why this is not just a venue wrapper
Venue API directly
Raw Kalshi or Polymarket access
Cross-venue context, world state, gov/econ links, next actions
Raw unified data API
Normalized market data
Agent context, event probability synthesis, delta workflows
News/search API
Documents and headlines
Market-implied probabilities and liquidity-aware context
SimpleFunctions
Probability state, context, search, screens, index, and workflow links
Not a broker, exchange, custodian, or investment adviser
Read next from the library
Matched from SimpleFunctions blog, opinions, technical guides, concepts, and learn pages.
MCP Servers for Prediction Markets: Connect Claude Code to Kalshi and Polymarket
Connect Claude Code, Cursor, or Cline to Kalshi and Polymarket prediction markets via MCP. One-line setup, 18 tools, real-time market data for AI agents.
Wikipedia for Probabilities
We built a probability index covering 3,200+ events across Kalshi and Polymarket. Cross-venue, liquidity-weighted, updated every 15 minutes. Designed for AI agents, indexed for Google. The canonical answer layer for event probabilities.
Kalshi vs Polymarket: Which Prediction Market Should You Trade?
In-depth comparison of Kalshi and Polymarket for prediction market traders. Regulatory structure, liquidity, fees, API tooling, and cross-venue trading with SimpleFunctions.
Piping prediction market signals into your existing trading system
Three integration patterns for piping Kalshi and Polymarket data into existing trading infrastructure: cron polling, agent middleware, and thesis-as-filter.
Position Sizing for Prediction Markets: Kelly Criterion Meets Causal Models
How to use Kelly criterion for prediction market position sizing. With causal model confidence as the probability input, you can calculate optimal bet sizes on Kalshi and Polymarket.
Prediction Market
Learn how prediction markets work, why prices equal probabilities, and how to trade on Kalshi and Polymarket.
FAQ
What is a prediction market API?
A prediction market API gives applications programmatic access to event contracts, prices, probabilities, liquidity, and market metadata. SimpleFunctions adds context, search, screening, world state, gov/econ links, and next actions on top of raw venue data.
Does SimpleFunctions include Kalshi and Polymarket?
Yes. Public SimpleFunctions endpoints normalize Kalshi and Polymarket market data where available and expose search, screens, world state, cross-venue pairs, and market detail APIs.
How is this different from using Kalshi or Polymarket directly?
Venue APIs are best for raw venue access. SimpleFunctions is built for cross-venue probability state, natural-language queries, agent workflows, gov/econ context, and follow-up actions.
Can AI agents use the API without browsing?
Yes. Agents can call /api/agent/world for a compact world state, /api/agent/world/delta for changes, /api/tools for tool discovery, and /api/public/query for event probability search.
Does SimpleFunctions execute trades?
SimpleFunctions exposes software workflows for intents, triggers, routing, and monitoring. It is not a broker, exchange, custodian, FCM, or investment adviser.
What endpoints are free?
Many public endpoints are available without auth, including world state, query, screen, market detail, index, query-gov, query-econ, and cross-venue surfaces. Authenticated tools are used for user-specific workflows.
Does the prediction market API return probabilities or only market prices?
Both. Kalshi prices are returned in cents and Polymarket prices in 0–1 decimal; the API also exposes implied probability fields and surfaces them through query, world state, and the prediction market index so agents can reason in probability space without per-venue conversion.
Can I query economic data and prediction markets together?
Yes. /api/public/query-econ accepts natural-language macro questions, returns FRED-sourced indicator series, and links matched prediction market contracts in the same response.
Can I query legislation and prediction markets together?
Yes. /api/public/query-gov resolves bill names, sponsors, and legislative status through a Congress-data mirror, then links related Kalshi and Polymarket markets where they exist.
Is there an MCP server or CLI for the prediction market API?
Yes. SimpleFunctions ships an MCP server for agent integration and a Kalshi/Polymarket CLI for terminal workflows. Both surface the same query, world, screen, and market-detail endpoints.
Related surfaces
World State API for AI Agents
A compact live world model built from prediction markets.
Event Probability API
Search real-world events as structured probability state.
Prediction Market Index
Disagreement, geo risk, breadth, and activity across the tape.
Prediction Market Search API
Natural-language search across Kalshi, Polymarket, news, and data.
Economic Data API
Official economic series linked to prediction markets.
Government Data API
Bills, nominations, members, and related markets.
Prediction Market Execution
Intent, trigger, routing, and monitoring workflows.
Institutional Prediction Market Infrastructure
Prime-brokerage-style software for hedging, monitoring, and execution.
Prediction Market Trading Terminal
Visual market search, charts, and contract context for operators.