SimpleFunctions

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.

Built 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.

API reference

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.

query

original 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

context

government, economic, and topic-level source objects when available

nextActions

inspect, 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.

01

Search event probabilities

GET /api/public/query?q=Fed%20rate%20cut&limit=2
02

Read full market state

GET /api/agent/world?format=json
03

Wake on changes

GET /api/agent/world/delta?since=1h
04

Discover agent tools

GET /api/tools

Minimal 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

ApproachWhat you getWhat is missing

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.

Browse library

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