Outcome
Produce one reproducible Point-In-Time Backtesting run for a bounded Hyperliquid core BTC trades window.Backtest Contract
Declare the venue family, symbol, data family, route, integer-millisecond window, page budget, quality gate, output schema, and request IDs before the run starts. Keep raw API rows separate from derived features or strategy output.Prerequisites
- Choose one hypothesis that can be tested with one data family.
- Complete Choose venue and market family when the symbol namespace is not known.
- Check
/v1/data-quality/statusand the selected symbol’s coverage before using the window. - Set a finite page budget, gap policy, and output path.
Inputs
Steps
1
Freeze the inputs
Save the family, symbol, data family, numeric window, page size, quality threshold, gap policy, and output path before calling the API.
2
Check data quality
Call
/v1/data-quality/status and the exact symbol-coverage route. Keep those responses with the run even when the job later stops.3
Pull one bounded page
Use the exact request in the next section. Do not add concurrency until the first response and its request ID are saved.
4
Follow only returned cursors
If
meta.next_cursor is present, send that exact value within the declared page budget. Do not generate an unbounded loop.5
Choose the event surface when needed
If event order rather than returned rows is the requirement, stop the REST run and continue with WebSocket replay. Record the channel, numeric window, replay controls, gaps, and request IDs for that separate run.
REST Window Example
Expected state
The run has a route-specific response withsuccess, a data array of trade rows, and request metadata. It is complete only when the requested window is exhausted within the page budget and the quality decision allows use. A returned gap, stale state, or remaining cursor makes the run partial or stopped.
Verification
Check the first and last returned timestamps against the numeric bounds. If pagination occurs, keep the cursor chain and request IDs per page. If the run uses derived features, keep them in a separate artifact and retain the raw response and quality responses unchanged.Failure and recovery
400: fix the numeric bounds, symbol, or named parameter before retrying.401: repair the key source or header.429: honorRetry-Afterwhen present, otherwise use capped exponential backoff with jitter inside the retry budget.- A remaining cursor at the page budget: mark the run partial and resume under a new bounded manifest.
- A quality or
gap_detectedresult: stop the derived calculation, narrow the window, or rebuild the relevant state from the documented checkpoint path. - Missing rights for the intended use: stop and read Data rights before creating a benchmark, index, financial product, or bulk distribution.
Backtest Generation Checklist
- Venue family and symbol remain literal.
- Route, integer
start, integerend, andlimitare saved. - Page budget, cursor behavior, and request IDs are saved.
-
/v1/data-quality/status, coverage, freshness, and incident decisions are attached when used. - Raw rows remain separate from derived features.
- Do not generate unbounded loops.
- A gap or stale result changes the run status instead of being silently filled.