Categories
GET /api/v1/categories
Returns all categories in display order.
Auth: None
Rate limit: v1: 60 req / 60 s per IP
Response
{
"data": [
{ "slug": "estonian_politics", "name": "Estonian Politics" },
{ "slug": "estonian_sports", "name": "Estonian Sports" }
]
}| Field | Type | Description |
|---|---|---|
slug | string | URL-safe identifier used in subsequent endpoints |
name | string | Display label |
Example
curl https://juhus.ee/api/v1/categoriesGET /api/v1/categories/:slug/events
Returns paginated events belonging to a category.
Auth: None
Rate limit: v1: 60 req / 60 s per IP
Path parameters
| Param | Type | Description |
|---|---|---|
slug | string | Category slug from /categories |
Query parameters
| Param | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number (≥ 1) |
limit | integer | 20 | Results per page (1–50) |
Response
{
"data": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"title": "2026 Estonian Parliamentary Election",
"description": "Markets for the 2026 Riigikogu election.",
"category": "estonian_politics",
"startsAt": "2026-03-01T00:00:00.000Z",
"endsAt": "2026-03-15T23:59:59.000Z",
"createdAt": "2025-11-10T12:00:00.000Z",
"thumbnailId": "d4e5f6a7-b8c9-0123-def0-234567890123",
"thumbnailUrl": "https://cdn.juhus.ee/thumbnails/election-2026.webp"
}
],
"meta": {
"total": 42,
"page": 1,
"limit": 20,
"hasMore": true
}
}| Field | Type | Description |
|---|---|---|
id | UUID string | Event identifier |
title | string | Event title |
description | string | null | Optional description |
category | string | Category slug |
startsAt | ISO 8601 | null | When the event starts |
endsAt | ISO 8601 | null | When the event ends |
createdAt | ISO 8601 | Creation timestamp |
thumbnailId | UUID string | null | Thumbnail image id; null if none set |
thumbnailUrl | string | null | Thumbnail image URL; null if none set |
Errors
| Status | Body | When |
|---|---|---|
404 | { "error": "Category not found" } | Unknown slug |
GET /api/v1/categories/:slug/markets
Returns paginated markets belonging to a category.
Auth: None
Rate limit: v1: 60 req / 60 s per IP
Path parameters
| Param | Type | Description |
|---|---|---|
slug | string | Category slug |
Query parameters
| Param | Type | Default | Description |
|---|---|---|---|
status | "open" | "closed" | "open" | "open" returns markets with status open; "closed" returns closed and resolved |
page | integer | 1 | Page number |
limit | integer | 20 | Results per page (1–50) |
Response
{
"data": [
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"title": "Will Reform Party win the most seats?",
"description": "Resolves YES if Reform Party gets the most Riigikogu seats.",
"category": "estonian_politics",
"status": "open",
"eventId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"lastTradePrice": 58,
"yesVolume": 124500,
"noVolume": 87300,
"closeTime": "2026-03-01T20:00:00.000Z",
"createdAt": "2025-11-15T09:00:00.000Z",
"resolvedOutcome": null,
"thumbnailId": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"thumbnailUrl": "https://cdn.juhus.ee/thumbnails/reform-2026.webp"
}
],
"meta": {
"total": 17,
"page": 1,
"limit": 20,
"hasMore": false
}
}| Field | Type | Description |
|---|---|---|
id | UUID string | Market identifier |
title | string | Market title |
description | string | Market description |
category | string | Category slug |
status | string | open | paused | closed | resolved |
eventId | UUID string | null | Parent event, or null for standalone markets |
lastTradePrice | integer | null | Most recent trade price (1–99) |
yesVolume | integer | Total YES-side volume in EUR-cents |
noVolume | integer | Total NO-side volume in EUR-cents |
closeTime | ISO 8601 | null | Scheduled trading close time |
createdAt | ISO 8601 | Creation timestamp |
resolvedOutcome | "yes" | "no" | "custom" | null | Resolution result; null while unresolved |
thumbnailId | UUID string | null | Thumbnail image id; null if none set |
thumbnailUrl | string | null | Thumbnail image URL; null if none set |
Errors
| Status | Body | When |
|---|---|---|
404 | { "error": "Category not found" } | Unknown slug |