API Reference
Prediction Markets API
Universal endpoints for live Polymarket and Kalshi market data – probabilities, volume, outcomes and resolution history.
Authentication
All prediction-market endpoints require a valid API key. Pass it as the X-API-Key header. Keys are managed at /api-docs.
curl -H "X-API-Key: YOUR_KEY" "https://krokodds.com.au/api/v1/prediction-markets/universal?status=open&limit=10"
Data sources & sync
- Polymarket – Gamma API + CLOB order book. On-chain prediction market with the deepest political, economic and crypto markets.
- Kalshi – US-regulated event exchange. Public API for event contracts across politics, economics and sports.
- Synced every 30 minutesby the universalMarketSync Cloud Function into Supabase.
GET
/api/v1/prediction-markets/universalReturns every active Polymarket and Kalshi market across all categories – politics, economics, crypto, sports and more. Markets are ordered by volume descending. Default status is open.
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| source | string | – | Filter by source. One of: polymarket, kalshi. |
| category | string | – | Filter by platform category (e.g. politics, economics, crypto, sports). |
| status | string | open | Market status. One of: open, closed, settled, halted. |
| limit | integer | 50 | Results per page. Min 1, max 200. |
| offset | integer | 0 | Pagination offset. |
| search | string | – | Case-insensitive text search on the market question. |
Example request
curl -H "X-API-Key: sk_live_abc123" \ "https://krokodds.com.au/api/v1/prediction-markets/universal?source=polymarket&status=open&limit=2"
Example response
{
"success": true,
"data": [
{
"id": "polymarket_0x8a3d...",
"public_id": "a7f3c2e1b4d9087654321fedcba98765",
"source": "polymarket",
"platform_category": "politics",
"market_id": "0x8a3d...",
"question": "Will the US have a government shutdown in 2026?",
"description": "This market resolves to Yes if the US federal government...",
"outcomes": ["Yes", "No"],
"outcome_prices": [0.35, 0.65],
"status": "open",
"result": null,
"volume": 2845200,
"liquidity": 189300,
"best_bid": 0.34,
"best_ask": 0.36,
"end_date": "2026-12-31T00:00:00Z",
"created_at": "2026-03-15T10:00:00Z",
"fetched_at": "2026-08-11T12:30:00Z",
"resolved_at": null
},
{
"id": "polymarket_0x7b2c...",
"public_id": "e5d4f3a2b1c0987654321098765432ab",
"source": "polymarket",
"platform_category": "economics",
"market_id": "0x7b2c...",
"question": "Will the Fed cut rates in September 2026?",
"outcomes": ["Yes", "No"],
"outcome_prices": [0.72, 0.28],
"status": "open",
"volume": 1520800,
"best_bid": 0.71,
"best_ask": 0.73,
"fetched_at": "2026-08-11T12:30:00Z"
}
],
"meta": {
"count": 2,
"tier": "standard",
"filter": { "source": "polymarket", "category": null, "status": "open" },
"pagination": { "limit": 2, "offset": 0 },
"note": "Full-catalog Polymarket + Kalshi markets across every category.",
"timestamp": "2026-08-11T12:30:15Z"
}
}GET
/api/v1/prediction-markets/universal/resolutionsAppend-only archive of resolved Polymarket and Kalshi markets. Returns markets that have settled, ordered by resolution date descending. Useful for backtesting, historical analysis and settlement auditing.
Query parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| source | string | – | Filter by source. One of: polymarket, kalshi. |
| category | string | – | Filter by platform category. |
| days | integer | 30 | Lookback window in days. Min 1, max 365. |
| limit | integer | 50 | Results per page. Min 1, max 200. |
| offset | integer | 0 | Pagination offset. |
Example request
curl -H "X-API-Key: sk_live_abc123" \ "https://krokodds.com.au/api/v1/prediction-markets/universal/resolutions?days=7&limit=2"
Example response
{
"success": true,
"data": [
{
"id": "kalshi_ABC123",
"public_id": "9f8e7d6c5b4a3210fedcba9876543210",
"source": "kalshi",
"market_id": "ABC123",
"question": "Will CPI exceed 3.5% in July 2026?",
"platform_category": "economics",
"outcomes": ["Yes", "No"],
"result": "No",
"final_prices": [0.18, 0.82],
"volume_at_resolution": 892100,
"resolved_at": "2026-08-10T16:00:00Z",
"captured_at": "2026-08-10T16:05:12Z"
}
],
"meta": {
"count": 1,
"tier": "standard",
"filter": { "source": null, "category": null, "days": 7 },
"pagination": { "limit": 2, "offset": 0 },
"note": "Resolved Polymarket + Kalshi markets, append-only resolution archive.",
"timestamp": "2026-08-11T12:30:15Z"
}
}Notes
- Volume is in the source platform's native unit (USD for both Polymarket and Kalshi). It represents total cumulative trading volume for the market.
- Outcome prices are normalised to a 0–1 range (e.g. 0.65 = 65% implied probability). The array indices correspond to the
outcomesarray. - Rate limits vary by tier. See /api-docs for tier details.
- CORS – all origins allowed (
Access-Control-Allow-Origin: *). - Cache – responses are cached for 5 minutes (300s). The
X-Cache-Ageheader indicates the cache window.