Skip to main content

Overview

The backtest endpoints let you replay a catalogued ReplayPack through the Veridex proof engine and receive a BacktestReport with CLV scores, 7 proof checks, and a verifiable run_id. The backtest uses the same deterministic runtime as live and arena runs — the mode label is always "Backtest" and is never dressed up as a live result. Packs are addressed by pack_id (a stable catalog key), never by a filesystem path. The server resolves the pack server-side against the verified R-2 catalog, so a client cannot point the replay loader at an arbitrary directory. Both endpoints are publicly accessible — no auth required.

POST /backtests

Run an agent against a catalogued ReplayPack and store the resulting BacktestReport. Auth: None required. Request body: BacktestRunRequest
The request body uses extra="forbid": any unknown field (including the legacy removed pack_dir field) returns 422. How the backtest runs:
  1. The server resolves pack_id against the verified R-2 catalog. An unknown pack_id returns 404; an uncatalogued fixture_id for the pack returns 422.
  2. The server derives the content_hash from the verified catalog entry and binds it into the sealed report — the run’s replay identity is pinned to the catalog.
  3. The run is driven over a single deterministic offline agent (no LLM, no network).
  4. The sealed report is stored under backtest_id for later retrieval.
Response: BacktestRunResponse
Errors:
  • 400 — invalid window spec or pack replay failure
  • 404pack_id is not in the verified catalog
  • 422fixture_id is not catalogued for the pack, or the request body contains unknown fields

GET /backtests/

Fetch a stored BacktestReport by its identifier. Path parameter: backtest_id — returned by POST /backtests Auth: None required. Response: BacktestReport The full report contains CLV scores, proof checks, and the bound content_hash. The real_executable_edge_bps field is always null on the backtest path — a backtest replay makes no fillability claim. Errors:
  • 404 — unknown backtest_id

GET /replay-packs

List all available hash-verified ReplayPack catalog entries. Auth: None required. Response: ReplayPackListResponse
Each ReplayPackInfo item contains: This endpoint lists only packs that the R-2 catalog has already hash-verified and allowlisted. A tampered or unverified pack is excluded at catalog-build time and never appears here. The internal filesystem path (pack_dir) is deliberately not surfaced — the browser addresses packs by pack_id only.

GET /replay-packs/

Fetch one verified pack’s hash, provenance, and fixtures by pack_id. Path parameter: pack_id Auth: None required. Response: ReplayPackInfo (same shape as items in the list above) Errors:
  • 404 — unknown or unverified pack_id

Raw real-fixture odds from genuine TxLINE captures are not redistributed — licensed data stays local. Synthetic packs are included and self-labeled as synthetic on every surface. Genuine captured packs must be provided by the operator deploying the service.