The OpenAPI spec is assembled from utoipa annotations on the axum handlers and
covers the full
/v1 surface (24 paths, enforced in CI). It’s the source of
truth the first-party TypeScript and Python SDKs are generated from.Base URL
Authentication
Every endpoint is public — noAuthorization header, no API key. See
authentication.
Rate limit
Per-IP sliding window: currently 240 requests a minute per IP on REST (see theRateLimit-Limit header). WebSocket allows 20 concurrent
connections per IP. Liveness / readiness probes are exempt.
Need more? Email rafael@pegana.xyz.
Cross-origin
CORS allowed frompegana.xyz, www.pegana.xyz, localhost:3000 by default.
Self-hosted instances can extend via CORS_EXTRA_ORIGINS.
Errors
Standard HTTP codes. Error bodies carry a stableerror code, usually as
{"error": "...", "message": "..."}. Every code is listed in Errors.
SDKs
First-party typed clients — TypeScript (@peganahq/sdk-ts) and Python
(pegana-sdk) — are generated from the OpenAPI spec above and cover every /v1
endpoint, plus a hand-written live-feed WebSocket helper (PegFeed / peg_feed).
Version 0.4.0 of both packages (
@peganahq/sdk-ts on npm, pegana-sdk on PyPI, released
2026-10-25) is the current release. Earlier versions (npm 0.3.1, PyPI 0.3.0) predate the
2026-10-20 endpoint removals and still include /v1/alerts, /v1/auth/* and /v1/me/*
calls, which return 404; upgrade to 0.4.0 to drop them.openapi-typescript + openapi-fetch
for TypeScript, openapi-python-client for Python; orval also works).
Quick links
Read one state
GET /v1/assets/:asset/state — the canonical read.Stream live
wss://api.pegana.xyz/v1/ws: live push.