Forecasting · documentation
↗ Open dashboard
Operations

Routes & API reference

Every route the server exposes, and exactly how the two Polymarket upstreams are proxied.

Routes

Method & pathBehaviour
GET /The dashboard, with the account bar injected. Public.
GET /loginThe login form. Redirects to / if already signed in.
POST /loginValidates credentials (constant-time compare); on success sets the signed session cookie and redirects to /; on failure re-renders with an error (HTTP 401).
GET /logoutClears the cookie and returns to /.
GET /docs/This documentation site (static files under public/docs/).
GET /forecasts.jsonBundled forecast data. Other static files under public/ are served the same way; missing optional files return 404.
GET /api/gamma/*Proxied to the Polymarket Gamma API.
GET /api/clob/*Proxied to the Polymarket CLOB.

Proxy mapping

Dashboard callUpstream
/api/gamma/events?closed=false&limit=500&tag_slug=weather&order=liquidity&ascending=false https://gamma-api.polymarket.com/events?…
/api/clob/book?token_id=<id> https://clob.polymarket.com/book?token_id=<id>

The proxy forwards the path and query string unchanged, sends a JSON Accept header, and returns the upstream status, content-type and body verbatim. Only GET is handled — the dashboard makes no other request types. On an upstream failure the proxy responds 502 with a short JSON error.

Static fallback rules

Quick checks

# dashboard responds
curl -I http://<server-ip>/

# forecast data present
curl -s http://<server-ip>/forecasts.json | head -c 200

# live market proxy reachable (expect JSON, not an error)
curl -s "http://<server-ip>/api/gamma/events?limit=1&tag_slug=weather" | head -c 200
Forecasting dashboard documentation · Meteo Bulgaria EOOD · 2026