API Reference
Events
Fetch events — groups of related markets — on a platform
An event groups related markets (e.g. "2024 US Election" → many markets). Like every endpoint, events are scoped to a single platform and returned in one normalized schema. We do not aggregate across platforms.
All endpoints require Authorization: Bearer <key>.
Base URL: https://prediction-router-api.kalashshah47.workers.dev
Platform support: polymarket kalshi. Other platforms return 405 UNSUPPORTED_OPERATION.
GET /v1/events
List events on a platform.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
platform | string | ✓ | polymarket or kalshi |
q | string | Keyword search (Polymarket) | |
status | string | open closed resolved | |
limit | integer | Max results. Default 20, max 100 | |
offset | integer | Pagination offset. Default 0 |
Example
curl "https://prediction-router-api.kalashshah47.workers.dev/v1/events?platform=kalshi&limit=2" \
-H "Authorization: Bearer pr_..."Response
{
"events": [
{
"id": "KXPRES-2024",
"platform": "kalshi",
"title": "2024 Presidential Election",
"category": "Politics",
"status": "open",
"closeTime": "2024-11-05T00:00:00Z",
"url": "https://kalshi.com/markets/kxpres",
"marketCount": 6
}
]
}GET /v1/events/:id
Fetch one event with its nested markets.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
platform | string | ✓ | polymarket or kalshi |
Response
{
"event": {
"id": "KXPRES-2024",
"platform": "kalshi",
"title": "2024 Presidential Election",
"category": "Politics",
"status": "open",
"closeTime": "2024-11-05T00:00:00Z",
"url": "https://kalshi.com/markets/kxpres",
"marketCount": 6,
"markets": [
{
"id": "KXPRES-2024-DJT",
"platform": "kalshi",
"title": "Trump wins",
"outcomes": [
{ "id": "yes", "label": "Yes", "probability": 0.52, "price": 0.52 },
{ "id": "no", "label": "No", "probability": 0.48, "price": 0.48 }
],
"volume": 1000,
"liquidity": 500,
"status": "open",
"resolution": null,
"closeTime": "2024-11-05T00:00:00Z",
"url": "https://kalshi.com/markets/KXPRES-2024-DJT"
}
]
}
}Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_ERROR | platform missing or unknown |
| 405 | UNSUPPORTED_OPERATION | Platform does not expose events |