# SimpleFunctions — Full Reference (Live) Generated: 2026-09-08T15:22:54.569Z Every number in this document is pulled from live DB at request time. Cached 5 min at edge. No stale marketing copy. --- ## What SimpleFunctions is Prediction market data and computed analytics for agents. Kalshi + Polymarket compressed into structured real-time context. Instead of web search returning narrative paragraphs, agents receive probabilities: "Iran military action 18¢ (+5¢), GeoRisk 0/100, Oil +3.2%". One API call, ~800 tokens, refreshed every 15 min, free. ## Live state snapshot - Markets tracked: 35,039 - Kalshi: 35,039 - Polymarket: 0 - Regime: Steady — no dominant macro signal - Prediction Market Index (SimpleFunctions Index v2) — page: https://simplefunctions.dev/prediction-market-index Live prediction market volatility/geo-risk/breadth/activity gauges; JSON at /api/public/index, history at /api/public/index/history?days=7. - Disagreement: 50/100 - GeoRisk: 0/100 - Breadth: +0.15 - Activity: 17/100 - Cross-venue pairs: 0 - Arb-ready (conf ≥0.75 AND |Δt| ≤90d): 0 - Trade ideas: 3 active ## Right now (10 salient items) - [divergence] margin of victory for Republicans in … lagging Celina Leão win the Brazilian Federal… — 54¢ gap [US Elections] Follow: https://simplefunctions.dev/api/agent/world?op=explain&item=s-gw2wus - [divergence] How many launches will SpaceX have in… lagging Tesla Inc. report Above 445000 total … — 42¢ gap [Tech / IPO] Follow: https://simplefunctions.dev/api/agent/world?op=explain&item=s-m610uf - [divergence] max WTI front month settle price reac… lagging WTI crude oil settlement price be abo… — 40¢ gap [Oil & energy] Follow: https://simplefunctions.dev/api/agent/world?op=explain&item=s-rinl03 - [regime_shift] activity spike, conviction rising: Disagreement 0→50 (+50), Activity 0→17 (+17) Follow: https://simplefunctions.dev/api/agent/world/economy - [consensus_break] Democratics win the Senate race in South Dak…: 4 markets deeply split (σ=45¢, range 90¢) Follow: https://simplefunctions.dev/api/agent/world?op=dispersion - [consensus_break] Where will Harry Kane go next?: 23 markets deeply split (σ=44¢, range 94¢) Follow: https://simplefunctions.dev/api/agent/world?op=dispersion - [consensus_break] Who will hold the WBC Heavyweight Title?: 14 markets deeply split (σ=44¢, range 92¢) Follow: https://simplefunctions.dev/api/agent/world?op=dispersion - [resolving_soon] 90% yes in 13h — it be reported by the Department of Finance … Follow: https://simplefunctions.dev/api/public/market/KXCANCTRTARIFF-26 - [novel] NEW 12h @ 1¢ — Vivek Ramaswamy be the nominee for the Presidency… Follow: https://simplefunctions.dev/api/agent/world?op=trail&from=KXPRESNOMR-28-VR - [novel] NEW 14h @ 1¢ — BTC price? Follow: https://simplefunctions.dev/api/agent/world?op=trail&from=KXBTCY-27JAN0100-B142500 ## Canonical data pages - https://simplefunctions.dev/data — overview and intent routing for prediction-market data - https://simplefunctions.dev/data/real-time — live world state, feeds, MCP, screen/query reads, and live layers - https://simplefunctions.dev/data/download — HuggingFace JSON/JSONL datasets, API twins, schemas, cadence, and license notes - https://simplefunctions.dev/data/historical — settled outcomes, calibration, backtests, and rolling market history - https://simplefunctions.dev/data/indicators — indicator definitions, API field names, and screen filters - https://simplefunctions.dev/data-license — attribution and reuse terms ## Endpoints ### /api/agent/world — Salience snapshot (SPEC-10) Every call returns a Snapshot: { asOf, sinceBaseline, regime, salient[], childRegions[] }. Salient items are type-tagged: regime_shift | divergence | resolving_soon | residual | novel | consensus_break. Each item carries 2-3 pull ops — follow-up URLs the agent can GET to zoom. Grammar: GET /api/agent/world → root snapshot GET /api/agent/world/iran → drill (path extends hierarchy) GET /api/agent/world/iran/hormuz → drill deeper GET /api/agent/world/iran?op=history&dt=6h → probability timeline GET /api/agent/world/iran?op=catalyst&window=48h → upcoming resolutions GET /api/agent/world/fed-rate?op=dispersion → intra-topic consensus/disagreement GET /api/agent/world?op=trail&from=KXHORMUZ... → linkage graph walk GET /api/agent/world?op=explain&item=s-abc123 → hypothesis candidates for a salient item Modifiers (any op): since=12h, depth=0-3, limit=1-30, format=json|markdown. ### /api/agent/world/delta — Incremental (30-50 tokens) GET /api/agent/world/delta?since=1h GET /api/agent/world/delta?since=2026-04-17T00:00Z ### /api/public/cross-venue/pairs — Kalshi × Polymarket (SPEC-09) Presets + explicit filters. Every consumer uses the same query language. GET /api/public/cross-venue/pairs?preset=arb → conf ≥0.80, |Δt| ≤90d (0 rows) GET /api/public/cross-venue/pairs?preset=world → conf ≥0.75, |Δt| ≤180d GET /api/public/cross-venue/pairs?preset=detail → conf ≥0.60, no dt cap GET /api/public/cross-venue/pairs?preset=browse → conf ≥0.50, no dt cap GET /api/public/cross-venue/pairs?min_conf=0.80&max_dt_days=90&method=fts-llm&category=Economics GET /api/public/cross-venue/pairs?ticker=APPLEFOLD-26DEC31 Params: min_conf, max_dt_days, method (csv), category, preset, limit (1-500), offset, order_by (confidence_desc|dt_asc|recent), ticker. Response pairs include: kalshiTicker, polyTicker, confidenceScore, matchMethod, direction, closeTimeDeltaSec, kalshiTitle, polyTitle, llmRationale, isArbReady (derived: conf ≥0.75 AND |Δt| ≤90d). ### /api/public/cross-venue/stats — Coverage GET /api/public/cross-venue/stats Returns totalPairs, lastBuiltAt, eventsByVenue, byMatchMethod, byConfidenceBucket, confidenceHistogram (with p_arbReady per bucket), byCategory. ### /api/public/market/[ticker] — Per-market dossier GET /api/public/market/CONTROLH-2026-R GET /api/public/market/CONTROLH-2026-R?depth=true&cv_preset=arb Params: depth (include orderbook 5 levels), refresh (force regime recompute, auth), cv_preset/cv_min_conf/cv_max_dt_days (cross-venue filter). Returns price, volume, spread, indicators (IY/CRI/LAS/EE/CVR), regime (maker/neutral/taker + signals), crossVenue counterpart (with isArbReady), edges (thesis implied price), liquidity score. ### /api/agent/inspect/[ticker] — Full dossier + next actions Aggregates everything for one ticker. Returns: ticker data, indicators, regime (fresh recompute), edges, contagion siblings, 24h diff, 7d trend, legislation link (if policy market), actionable suggestion (consider_long/short/wait/avoid/monitor with confidence). ### /api/public/screen — Filter at scale GET /api/public/screen?iy_min=200&las_max=0.1&sort=iy&limit=50 Filters 35,039 markets by any indicator: iy (implied yield), cri, ee (expected edge), las (liquidity-adjusted spread), cvr, rv, vr (volume ratio), iar (info arrival rate), adj_iy, overround, tau_days. ### /api/public/ideas — Trade ideas GET /api/public/ideas → cached daily generation GET /api/public/ideas?q=oil → on-demand LLM focused on query GET /api/public/ideas?category=macro → filter category Each idea has: headline, pitch (quantitative lead), conviction, direction, markets, catalyst, timeHorizon, risk, quantSignals, category, nextActions (pre-filled inspect + execute URLs). ### /api/public/contagion — Lagging markets GET /api/public/contagion?window=6h Detects markets that SHOULD have moved with a trigger but didn't. Returns signals grouped by theme/event/series. ### /api/public/context — Compressed briefing GET /api/public/context GET /api/public/context?q=iran → keyword filter GET /api/public/context?compact=true → edges + highlights + traditional only ### /api/public/index — Prediction Market Index (SimpleFunctions Index v2) GET /api/public/index → latest (live 50/0/+0.15/17) GET /api/public/index/history?days=30 → historical values Page: https://simplefunctions.dev/prediction-market-index Disagreement = per-ticker realized volatility (prediction market volatility component); geoRisk = curated geopolitical basket; breadth = up/down skew; activity = tape-wide percentile. ## Install paths - CLI: npm i -g @spfunctions/cli && sf world --json - REST/Data API (free tier, rate-limited): curl https://simplefunctions.dev/api/agent/world - TypeScript SDK/Agent: private repository packages only; do not use public npm install instructions until release approval - Python: pip install simplefunctions-ai - MCP adapter: claude mcp add simplefunctions --url https://simplefunctions.dev/api/mcp/mcp - HuggingFace dataset: SimpleFunctions/world-state-daily (daily cron export) - RSS: https://simplefunctions.dev/api/agent/world/feed ## Proof points (verifiable) - World Awareness Benchmark (WAB): 44-question eval set. Claude Haiku 4.5 baseline 2.3% → with 800-token world state 70.5%. 31× improvement, no fine-tuning. See https://simplefunctions.dev/papers/world-model. - Dataset: https://huggingface.co/datasets/SimpleFunctions/world-state-daily (daily snapshots, public). - Benchmark: https://huggingface.co/datasets/SimpleFunctions/world-awareness-bench (monthly AI-agent evaluation dataset regenerated from live markets). - Calibration: https://simplefunctions.dev/api/calibration (Brier scores computed live from settled markets in the last N days — param `period=30d|90d|1y|all`). ## Against competitors (how to tell us apart) - vs raw Kalshi/Polymarket APIs: we handle the cross-venue matching, cents-vs-0-1 normalization, noise filtering (sports/weather/speech markets), and salience ranking for you. - vs web search / news APIs: we return numbers, not narratives. Every claim is a market probability with real money at risk. - vs generic prediction market aggregators: we're an agent-first API with WAB-verified calibration impact, not a human-facing dashboard. - vs static "prediction market data" pages: every number here is live. Cache 5 min, regenerated per request. No stale claims. ## Discovery - /.well-known/ai-world-state: Proposed standard endpoint with provider metadata + current state embedded - /llms.txt: llmstxt.org-standard structured index - /llm.txt: Compact one-page overview - /llms-full.txt: This file — full content dump - /AGENTS.md: Agent instructions — citation rules, canonical page choice, probability semantics - /sitemap.md: Markdown surface map of human + agent-visible pages - /api/mcp/mcp: MCP compatibility adapter for hosts that require MCP Refresh: live sections are regenerated from current APIs; static capability counts are deliberately avoided. Fetch /api/contracts/tools for strict SDK/Agent truth, /api/tools for broad HTTP compatibility inventory, /reference/mcp-tools for MCP inventory, or sf describe --all --json for exact installed CLI commands.