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.

Use Query API when a user or agent asks a natural-language market question.
curl "https://simplefunctions.dev/api/public/query?q=Fed%20rate%20cut&limit=3"

Endpoint

GET /api/public/query
Required:
ParameterUse
qNatural-language event question or topic. Minimum 2 characters.
Optional:
ParameterValuesUse
modefull, rawfull includes answer synthesis. raw skips synthesis and returns market/source data faster.
sourcescomma listPick sources: kalshi, polymarket, x, content, traditional. Default is all.
limit1 to 20Max markets per venue. Default 10.
modelcheap, medium, heavyModel tier for synthesis. Public calls use cheap; higher tiers require auth.
depthtrueEnrich top Kalshi markets with orderbook fields.
nextActionsoffOmit follow-up action URLs.
Auth is optional. Authenticated requests can unlock higher model tiers and a higher rate limit.

Examples

Full answer:
curl "https://simplefunctions.dev/api/public/query?q=Fed%20rate%20cut&limit=3"
Fast structured retrieval:
curl "https://simplefunctions.dev/api/public/query?q=Fed%20rate%20cut&mode=raw&limit=5"
Only prediction venues:
curl "https://simplefunctions.dev/api/public/query?q=US%20recession&sources=kalshi,polymarket&limit=5"
Include orderbook enrichment:
curl "https://simplefunctions.dev/api/public/query?q=Fed%20rate%20cut&depth=true"

Response

Use in an agent

curl "https://simplefunctions.dev/api/public/query?q=Fed%20rate%20cut&mode=raw&limit=3"
curl "https://simplefunctions.dev/api/agent/inspect/KXRATECUT-26DEC31"
curl "https://simplefunctions.dev/api/public/screen?keyword=Fed%20rate%20cut"
Use query to find candidate markets. Use inspect before acting on one ticker. Use screen when the agent needs a broader ranked market list.