Features.
Perception. Analysis. Execution. One engine for prediction markets.
SimpleFunctions watches the world, reasons about what matters, and acts when the post-slippage edge clears the floor. Twelve feature groups, a CLI-first command catalog, HTTP/Data APIs, WebSocket streams, MCP adapter for compatible hosts, and web workflows, all normalized across Kalshi and Polymarket.

Diderot · Encyclopédie 1760 — every tool, every plate, every craft, gathered into one volume. The original feature catalog.
Seven pillars
One engine. Many surfaces. Same shape on every one.
Perception → Analysis → Execution is the loop. Memory, calibration, coverage, and surfaces are the foundation that makes the loop reproducible and auditable.
PerceptionLive world state. News ingestion. Orderbook depth on every tick. Regime label per topic group.
AnalysisCausal thesis tree. Depth-adjusted edge. Adversarial search loop. Regime + flow toxicity overlay.
ExecutionIntent + trigger + kill chain. BYOK on both venues. Audit trail per session. Same shape across CLI / REST / MCP adapter.
MemoryHeartbeat ticks persisted; orderbook snapshots; thesis-state time series; HF + Kaggle daily dumps.
CalibrationLive Brier scores per venue / category / price bucket; realized vs predicted, fully auditable.
Coverage~210 macro contracts · ~50 crypto contracts · 18 topic groups · all Kalshi + Polymarket markets.
SurfacesCLI (@spfunctions/cli), REST/Data API (/api/* and /v1/*), WebSocket (/v1/ws), MCP adapter for compatible hosts, Web UI.
Twelve feature groups
Each group is a dedicated page with its own walkthrough, schema, FAQ, and live data. Click through for the deep version.
World State
Live prediction-market state distilled into a few hundred tokens for agents.
/world →
Theme Edge Detection
Find priced gaps across themes and matched cross-venue contracts.
/edge-discovery →
Causal Thesis System
Decompose any thesis into a tree of testable sub-claims and evaluate it on a heartbeat.
/theses →
Portfolio Autopilot
Autonomous LLM portfolio agent with mechanical risk gates and rolling memory.
/portfolio-autopilot →
Market Making
Quote and rebalance with adverse-selection detection.
/maker →
Taker Workflow
Decisive directional intents on news-driven moves with kill chain.
/taker →
Orderbook Analysis
Spread, depth, slippage, regime, flow toxicity for both venues.
/quant-trading →
Public API
CLI command catalog, REST endpoints, real-time WebSocket streams, MCP adapter.
/prediction-market-api →
Calibration
Live Brier scores by venue, category, and price bucket — auditable accuracy.
/calibration →
Heartbeat Engine
24/7 monitoring, news ingestion, thesis re-evaluation, kill triggers.
/heartbeat →
Policy Watch
Government shutdowns, Fed, tariffs, elections — same loop, policy lens.
/policy-watch →
Sports Market Making
Polymarket sports liquidity rewards — quadratic-score-optimal MM bot.
/sports →
Three layers, side by side
Perception feeds analysis; analysis feeds execution; execution feeds the audit trail and back into perception on the next tick.
1 · Perception
What is happening in the world right now?
Live prediction-market state, news scan, orderbook depth, regime label per topic group, calibration overlay.
2 · Analysis
What does it mean for my book?
Causal thesis tree, depth-adjusted edge, adversarial search, regime + flow toxicity overlay, what-if cascade.
3 · Execution
When is the right moment to act?
Intent + trigger + kill chain, BYOK on both venues, audit trail per session, same shape across CLI / REST / MCP adapter.
Reach the engine from anywhere
Same context shape, same intent shape. CLI first for operators and local agents, REST/Data API second for remote systems, WebSocket for tick streams, MCP last for compatible hosts.
$ npm i -g @spfunctions/cli
$ sf scan macro # live tape
$ sf book KXFEDDEC-25DEC31 # full ladder
$ sf edges --json --depth high # piped to jq
$ sf intent buy ... --kill ... # BYOK exec
$ sf agent --tool portfolio.fills.list --jsonGET /api/public/context (free CC-BY)
GET /api/public/edges (free)
GET /v1/orderbook/{ticker} (free)
GET /v1/candles/{ticker} (free)
POST /api/intents (BYOK + meter)
GET /api/portfolio/ledger (auth)wss://data.simplefunctions.dev/v1/ws
> {"action":"subscribe",
> "channel":"orderbook",
> "ticker":"KXFEDDEC-25DEC31"}
< {"ticker":"...","bid":[...],"ask":[...],
"regime":"trending","ts": 1714... }claude mcp add simplefunctions \
--url https://simplefunctions
.dev/api/mcp/mcp
mcp call simplefunctions.context { topics }
mcp call simplefunctions.edges { min_edge }
mcp call simplefunctions.intent.create { ... }FAQ
What does SimpleFunctions actually do?
It is an intelligence engine for prediction markets. Three layers: perception (live world state distilled to agent-readable tokens), analysis (causal thesis trees, depth-adjusted edges, regime detection, adversarial search), execution (taker, maker, autonomous portfolio, BYOK on Kalshi and Polymarket). The CLI is the primary operator surface; APIs are the network surface; MCP is the host adapter.
How is this different from a Bloomberg / FactSet / venue SDK?
Bloomberg ships data + analytics. Venue SDKs ship endpoints. SimpleFunctions ships a thesis loop tied to executable orderbooks: every 15 minutes it scans news, refreshes prices on both venues, walks orderbooks, computes edges, runs adversarial search, fires triggers, logs the audit trail. The output is decision-shaped, not screen-shaped.
Is it human-driven or agent-driven?
Both, by design. The CLI is the first-class human and agent surface; remote agents use the HTTP APIs; MCP hosts can use the adapter. A human reads briefings and arms intents from the CLI; an agent can run `sf ... --json`, call REST, or use MCP only when the host expects it.
Which venues does it cover?
Kalshi (CFTC-regulated US event contracts) and Polymarket (USDC-settled). Cross-venue match is built in: same event prices on both venues are tracked as matched pairs with depth scored on each book; matched-pair intents fire two legs simultaneously when post-slippage spread clears your floor.
What thesis topics does it cover?
Eighteen topic groups across macro (oil, Fed, CPI, recession, treasury yields, geopolitics, tariffs, elections, govt shutdowns, central banks), crypto (BTC/ETH/SOL ladders + ETF flow + halving), policy (legislation, executive actions, regulatory), and sports (EPL, NBA, UCL, CS2, IPL, NFL). New topics wire by configuring contract patterns; the engine is topic-agnostic.
What is the audit trail?
Intents log thesis context, risk gates, kill conditions, and status transitions. Recorded execution and fill events read back through /api/portfolio/ledger, /api/portfolio/fills, and portfolio attribution endpoints with explicit confidence; unknown attribution is preserved for review.
BYOK execution — what does that mean?
You hold the venue credentials. SimpleFunctions stores nothing custodial; orders are signed with your Kalshi RSA private key or your Polymarket Ethereum key, executed directly against the venues. Custody and KYC stay at the venue level. SimpleFunctions is not a broker, custodian, FCM, or investment adviser.
Cost?
Public endpoints free, no auth, CC-BY-4.0. Authenticated execution endpoints (intents, orders, BYOK) are metered by call. Heartbeat ticks bundled into metered quota. WebSocket /v1/ws free for read; authenticated writes metered. No subscription floor.
Open source?
The canonical local interface is the npm package @spfunctions/cli; its public GitHub repo is a reference and issue mirror, not the full private operator runtime. The HTTP/Data APIs are the canonical network interface. MCP is a compatibility adapter for MCP-only hosts. Some examples, datasets, and bots are public packages; the hosted runtime is the part you call into rather than run.
Backtest?
Daily Hugging Face dump under SimpleFunctions/* (CC-BY-4.0). Per-tick orderbook history via /v1/candles?tf=1m. Markets, edges, regime, thesis state — drop straight into pandas / vectorbt / Polars. Calibration page shows realized vs predicted at /calibration.
Related surfaces
How it works
Full system walkthrough — perception → analysis → execution loop.
Prediction market API
CLI command catalog, REST/Data API, real-time WebSocket streams, MCP adapter.
OpenClaw skill
Use MCP only where the host expects an MCP connector.
Portfolio Autopilot
A worked example: full LLM agent that runs the loop on a schedule.
Calibration
Live Brier scores by venue / category / price bucket.
World state
Live prediction-market state distilled to agent-readable tokens.
Changelog
What we shipped this week.