Authentication
Include your API key in the Authorization header with every request.
Authorization: Bearer YOUR_API_KEY
API keys are managed from your account dashboard.
Base URL
https://forecasthub.raba.ng/api/v1
Endpoints
GET
/api/v1/markets
— Paginated list of markets
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| category | string | Filter by category slug (e.g. politics) |
| status | string | open | resolved |
| source | string | polymarket | manifold |
| sort | string | volume (default) | newest | closing |
| per_page | integer | Results per page, max 100 (default 20) |
| page | integer | Page number |
Example Request
curl -H "Authorization: Bearer YOUR_KEY" \
"https://forecasthub.raba.ng/api/v1/markets?category=politics&per_page=10"
"https://forecasthub.raba.ng/api/v1/markets?category=politics&per_page=10"
GET
/api/v1/markets/{slug}
— Single market with outcomes & price history
Example Request
curl -H "Authorization: Bearer YOUR_KEY" \
"https://forecasthub.raba.ng/api/v1/markets/will-btc-hit-100k"
"https://forecasthub.raba.ng/api/v1/markets/will-btc-hit-100k"
Response includes
Market metadata, all outcomes with probabilities, and last 30 price history snapshots.
GET
/api/v1/categories
— All market categories
curl -H "Authorization: Bearer YOUR_KEY" \
"https://forecasthub.raba.ng/api/v1/categories"
"https://forecasthub.raba.ng/api/v1/categories"
GET
/api/v1/stats
— Platform-wide statistics
curl -H "Authorization: Bearer YOUR_KEY" \
"https://forecasthub.raba.ng/api/v1/stats"
"https://forecasthub.raba.ng/api/v1/stats"
Response Format
All responses are JSON. List endpoints return paginated results:
{
"data": [ ... ],
"meta": {
"current_page": 1,
"per_page": 20,
"total": 150,
"last_page": 8
},
"links": {
"prev": null,
"next": "https://forecasthub.raba.ng/api/v1/markets?page=2"
}
}
Rate Limits
API usage is metered per key. Limits and tiers are set by the site administrator.
Exceeding your limit returns 429 Too Many Requests.