Overview
The backtest endpoints let you replay a cataloguedReplayPack 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 cataloguedReplayPack 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:
- The server resolves
pack_idagainst the verified R-2 catalog. An unknownpack_idreturns404; an uncataloguedfixture_idfor the pack returns422. - The server derives the
content_hashfrom the verified catalog entry and binds it into the sealed report — the run’s replay identity is pinned to the catalog. - The run is driven over a single deterministic offline agent (no LLM, no network).
- The sealed report is stored under
backtest_idfor later retrieval.
BacktestRunResponse
Errors:
400— invalid window spec or pack replay failure404—pack_idis not in the verified catalog422—fixture_idis not catalogued for the pack, or the request body contains unknown fields
GET /backtests/
Fetch a storedBacktestReport 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— unknownbacktest_id
GET /replay-packs
List all available hash-verifiedReplayPack catalog entries.
Auth: None required.
Response: ReplayPackListResponse
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 bypack_id.
Path parameter: pack_id
Auth: None required.
Response: ReplayPackInfo (same shape as items in the list above)
Errors:
404— unknown or unverifiedpack_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.