API Documentation

Access live prediction market data programmatically.

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
categorystringFilter by category slug (e.g. politics)
statusstringopen | resolved
sourcestringpolymarket | manifold
sortstringvolume (default) | newest | closing
per_pageintegerResults per page, max 100 (default 20)
pageintegerPage number

Example Request

curl -H "Authorization: Bearer YOUR_KEY" \
  "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"

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"
GET /api/v1/stats — Platform-wide statistics
curl -H "Authorization: Bearer YOUR_KEY" \
  "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.

Ready to start?

Create an account and generate your API key in seconds.

Create free account →