Prediction Market Intelligence API
activeSimpleFunctions provides a complete intelligence layer for prediction markets. Query 9,706+ live contracts across Kalshi and Polymarket with natural language. The world state endpoint compresses all active markets into ~800 tokens of structured context — perfect for feeding into AI agents. Use the thesis engine to decompose investment ideas into causal assumption trees, detect mispriced contracts, and monitor 24/7 for edge opportunities. Available as REST API, CLI (`npm install -g @spfunctions/cli`), and MCP server for Claude Code and Cursor.
Interactive Demo
Input Parameters
Response
Run the tool to see results here
API Endpoint
https://sparkco.ai/api/tools/prediction-market-api/tryRate Limits
Use Cases
+1 more use cases
Code Examples
cURL Request
Basic cURL request example
curl -X GET "https://sparkco.ai/api/tools/prediction-market-api/try" \
-H "Content-Type: application/json" \
-d '{
"q": "example_q"
}'{
"success": true,
"data": {
"message": "Example response"
},
"meta": {
"latency_ms": 150,
"tool_version": "1.0.0"
}
}Tutorial
Getting Started with SimpleFunctions
The fastest way to start is the CLI:
npm install -g @spfunctions/cli
sf setup
sf scan "fed rate decision 2026"
sf agent # interactive natural language mode
REST API
Query any prediction market topic:
curl "https://simplefunctions.dev/api/public/query?q=recession+2026"
MCP Integration
Connect to Claude Code or Cursor:
claude mcp add simplefunctions --url https://simplefunctions.dev/api/mcp/mcp
Full documentation at simplefunctions.dev/docs.
Frequently Asked Questions
What markets does SimpleFunctions cover?
SimpleFunctions aggregates data from Kalshi and Polymarket, covering 9,706+ contracts across politics, economics, crypto, AI, geopolitics, sports, and more.
Is there a free tier?
Yes. Public endpoints (world state, query, scan) require no authentication. The full API offers 15M free tokens per month.
How does the MCP integration work?
SimpleFunctions exposes 29 MCP-compatible tools. Any MCP client (Claude Code, Cursor, custom agents) can connect and use tools like get_context, scan_markets, create_thesis, and more.
Start building AI spreadsheets in seconds
Connect your data sources, generate live formulas, and automate reporting. No credit card required.
Free tier available • HIPAA BAA included • Stripe, QuickBooks, PointClickCare integrations