Skip to main content

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.

SimpleFunctions APIs expose prediction markets as structured state. Base URL:
https://simplefunctions.dev

Surface groups

GroupPrefixAuthPurpose
Query and public markets/api/public/*no auth for public readsSearch, screens, market detail, index, gov/econ context
Agent world/api/agent/*no auth for core readsCompact world state, deltas, feed, inspect
Account/api/thesis, /api/feed, /api/intents, /api/keysAPI keyUser-owned theses, feed, intents, API keys
Portfolio/api/portfolio/*API keyPortfolio state, ticks, trades, config, views, strategies

First calls

curl "https://simplefunctions.dev/api/public/query?q=Fed%20rate%20cut&limit=3"
curl "https://simplefunctions.dev/api/agent/world"
curl "https://simplefunctions.dev/api/public/market/KXRATECUT-26DEC31"
curl "https://simplefunctions.dev/api/tools"

Authentication

Public market and world-state endpoints do not require auth. Authenticated endpoints use a SimpleFunctions API key:
curl -H "Authorization: Bearer $SF_API_KEY" \
  https://simplefunctions.dev/api/thesis
Authenticated reads are scoped to the authenticated user. Do not pass arbitrary userId fields from the client for normal account or portfolio reads.

Common response style

Public endpoints generally return the documented object directly. Account and portfolio surfaces use a stable envelope where appropriate:
{
  "ok": true,
  "data": {},
  "meta": {}
}
Errors should be structured:
{
  "ok": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Unauthorized",
    "status": 401
  }
}

Choosing the right endpoint

User questionEndpoint
”What markets match this real-world event?”GET /api/public/query?q=
”What should an agent know about the world right now?”GET /api/agent/world
”What changed since the last loop?”GET /api/agent/world/delta?since=
”What is the full state of this ticker?”GET /api/public/market/{ticker} or GET /api/agent/inspect/{ticker}
”What official economic/government context maps to this topic?”GET /api/public/query-econ?q= or GET /api/public/query-gov?q=
”What user-owned portfolio history can this agent see?”GET /api/portfolio/ticks and related portfolio endpoints
”What tools can an agent call?”GET /api/tools