This is the organized reference for SimpleFunctions APIs, CLI commands, real-time data, and agent integration surfaces. Use the main technical guide for the full one-page reference. Use this Developer Hub when you need to browse by topic, copy commands, inspect response shapes, or hand a precise surface map to an agent.Documentation Index
Fetch the complete documentation index at: https://docs.simplefunctions.dev/llms.txt
Use this file to discover all available pages before exploring further.
I am an agent
Start with
sf describe --all --json, pull world state, inspect markets, then decide whether to monitor, query, or act.I am a developer
Call REST endpoints for query, world state, market detail, gov/econ context, portfolio state, and tool discovery.
I am evaluating the product
Understand the world model: what it returns, why it is different from a venue API, and how agents consume it.
The contract
Human prose is optional. The structured contract is the product. Every CLI command that supports--json returns one valid JSON document on stdout. Every API page documents the shape that downstream systems should rely on. Agents should not scrape terminal text or rendered UI.
Core surfaces at a glance
| Surface | Start here | What it gives you |
|---|---|---|
| Agentic CLI | sf describe --all --json | Machine-readable local command surface for agents and scripts |
| Query API | GET /api/public/query?q= | Event questions mapped to Kalshi, Polymarket, context, and next actions |
| World State API | GET /api/agent/world | Compact prediction-market world model for an agent context window |
| Market Detail API | GET /api/public/market/{ticker} | One market with price, liquidity, indicators, regime, and follow-up URLs |
| Portfolio API | GET /api/portfolio/state | User-scoped state, ticks, trades, views, strategies, and portfolio memory |
| Tool Manifest | GET /api/tools | Public tool discovery for agent runtimes |
How to think about SimpleFunctions
Venue APIs expose markets. Search APIs expose documents. SimpleFunctions returns event probability state:- normalized venue objects
- market-implied probabilities
- source context kept separate from prose
- world-state snapshots and deltas
- account and portfolio memory for authenticated agents
- follow-up actions that point to inspect, screen, monitor, or execution workflows
Recommended reading path
Get oriented
Read the Quickstart and run one public query.
Give an agent context
Read World Model and decide when to call full state, delta, and inspect.
Base URLs
| Surface | URL | Use |
|---|---|---|
| API | https://simplefunctions.dev | Public query, world state, market detail, portfolio, and execution endpoints |
| Real-time data | https://data.simplefunctions.dev/v1 | Raw market data, search, snapshots, movers, candles, trades, and orderbooks |
| WebSocket | wss://app.simplefunctions.dev/ws | Live ticker, orderbook, trade, candle, and featured-market frames |
| Terminal | https://app.simplefunctions.dev | Browser workspace for market search, charts, contracts, and operator workflows |
First calls
Where to go next
| Need | Page |
|---|---|
| Agent-readable command surface | Agentic CLI |
| HTTP endpoints and response shapes | REST API |
| Compact world context for agents | World Model |
| Raw market-data feed | Real-Time Data API |
| User-scoped portfolio state | Portfolio CLI |
Agent handoff checklist
Before giving SimpleFunctions to an agent, give it these rules:- Use
sf describe --all --jsonbefore choosing commands. - Prefer
--jsonwhenever a command supports it. - Use
sf world --jsononce at session start. - Use
sf world --delta --json --since 1hinside long-running loops. - Inspect a market before acting on a ticker.
- Treat
nextActionsURLs as follow-up surfaces, not prose to scrape.
Production checklist
For a service, dashboard, or agent runtime:| Step | Use |
|---|---|
| Cache discovery | Store sf describe --all --json or GET /api/tools at boot. |
| Start broad | Pull GET /api/agent/world or sf world --json. |
| Narrow context | Use query, inspect, market detail, and portfolio endpoints only when needed. |
| Stream raw data | Use wss://app.simplefunctions.dev/ws for ticker, orderbook, trade, candle, and featured frames. |
| Keep state compact | Use deltas instead of polling full world state repeatedly. |
Launch surfaces
Open the terminal
Use the browser workspace for market search, charts, contract context, and operator handoff.
Read the API overview
Use HTTP endpoints when you need stable response shapes for services, agents, and dashboards.