Skip to main content

Sequency API reference (R&D slice)

Curated reference for the Sequency backend (sequency-api, FastAPI) endpoints that strategy R&D uses — running backtests, defining/encoding strategies, reading assessment verdicts, and pulling the market data / scores / levels that strategies key off. This is a deliberate slice of the full ~431-endpoint surface, not the whole API.
Source of truth: openapi.json (generated from the live app — see Regenerating). The group docs below are a hand-curated layer over that spec: they expand the schemas that matter for R&D, fill in the response shapes for endpoints that declare no response_model, and organize endpoints by purpose. When the spec and a group doc disagree, the spec wins — re-curate the doc.

Base URLs

Auth model

Strict auth is enforced in prod (anonymous requests → 401).
  • /api/graph/v1/... (public app surface): requires a Supabase JWT (end user) or an X-Internal-Secret header (service principal).
  • /api/internal/... (service-to-service): requires X-Internal-Secret only.
  • /health* is exempt.
X-Internal-Secret is validated against a per-service map (INTERNAL_SECRET_<NAME>) or the legacy INTERNAL_API_SECRET. For ad-hoc R&D calls on the host, source it from /opt/sequency/.env and pass it as the header (never print it).

Group docs

Regenerating

The committed openapi.json is produced from the running app (prod disables the public /openapi.json route, so generate it via the app object):
The group docs below are curated from the spec: each endpoint’s request/response shape is taken from openapi.json ($refs resolved), and shapes for endpoints that declare no response_model are read from the route handler and marked (inferred from handler). After refreshing openapi.json, diff it to see which paths/schemas changed and re-curate the affected group doc.

Scope note

This slice intentionally excludes execution/order-routing, options chains, news, debate, journaling, agents, and other surfaces not used by strategy R&D. The full endpoint inventory lives in openapi.json.