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
Required:
| Parameter | Use |
|---|
q | Natural-language event question or topic. Minimum 2 characters. |
Optional:
| Parameter | Values | Use |
|---|
mode | full, raw | full includes answer synthesis. raw skips synthesis and returns market/source data faster. |
sources | comma list | Pick sources: kalshi, polymarket, x, content, traditional. Default is all. |
limit | 1 to 20 | Max markets per venue. Default 10. |
model | cheap, medium, heavy | Model tier for synthesis. Public calls use cheap; higher tiers require auth. |
depth | true | Enrich top Kalshi markets with orderbook fields. |
nextActions | off | Omit 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
{
"query": "Fed rate cut",
"answer": "Prediction markets are pricing...",
"keyFactors": [],
"kalshi": [
{
"title": "Will the Federal Reserve cut rates before 2027?",
"ticker": "KXRATECUT-26DEC31",
"price": 49,
"volume": 102746.28,
"pageUrl": "https://simplefunctions.dev/markets/KXRATECUT-26DEC31",
"apiUrl": "https://simplefunctions.dev/api/public/market/KXRATECUT-26DEC31",
"inspectUrl": "https://simplefunctions.dev/api/agent/inspect/KXRATECUT-26DEC31"
}
],
"polymarket": [],
"traditional": [],
"x": [],
"content": [],
"theses": [],
"legislation": [],
"meta": {
"sources": ["kalshi", "polymarket", "traditional"],
"mode": "full",
"latencyMs": 0
},
"nextActions": {
"inspect": [],
"related": []
}
}
Fields appear only when the corresponding source has results.
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.