TIKTAPE
How-to Guide / Hyperliquid / OHLCV Only

How to backtest Hyperliquid strategies with historical OHLCV candles

This guide shows a practical candle-only workflow for exporting Hyperliquid OHLCV history, building signals from bar data, and simulating entries, exits, and trading costs without assuming unsupported TikTape datasets.

A clean OHLCV-only backtest workflow

TikTape exposes historical Hyperliquid candles through /api/v1/ohlcv. Use those bars to define your test range, calculate indicators, and evaluate strategy rules at candle close.

Everything below assumes candle inputs only. If your strategy depends on non-candle market signals, use a separate dataset and validation plan.

Step 1
Pick a market, interval, and time range that match your strategy horizon.
Step 2
Fetch the historical OHLCV candles you want to test with the TikTape API.
Step 3
Generate features and trading rules from candle fields only: open, high, low, close, and volume.

1. Define the candle window you want to test

Start with the exact market and bar size your strategy reads in production. A momentum system on 1h closes should be tested on 1h candles. A slower swing system may fit 4h or 1d candles better.

Decide whether you want a fixed historical study window or a rolling walk-forward setup. Either way, treat each candle as the unit of decision-making and evaluate signals after the bar has closed.

2. Export the OHLCV candles

Use TikTape's OHLCV endpoint to download the bars for your chosen market, interval, and date range. The shared footer links point to the BTC 1h history page and the provider comparison if you want those references before wiring the API into your backtest.

API Request
GET https://tiktape.xyz/api/v1/ohlcv
curl -H "X-API-Key: $TIKTAPE_API_KEY" \
  "https://tiktape.xyz/api/v1/ohlcv?coin=BTC&interval=1h&startTime=1704067200000&endTime=1706745600000&limit=10000"

Persist the response to your research environment, keep timestamps in UTC, and avoid mixing intervals inside one simulation run.

3. Build features from candles only

That discipline matters because OHLCV backtests are fast to iterate on, but they can still overstate performance if the feature pipeline reads future candles or mixes execution assumptions from lower-resolution data.

4. Simulate entries, exits, and costs

Once your features are ready, run the strategy rules bar by bar. Record the entry timestamp, side, size, exit condition, fees, and slippage assumptions for each position. Your simulator should be explicit about whether orders execute on the next candle open, the close, or another deterministic rule.

Use a holdout period or walk-forward split so parameter tuning and final evaluation are separate. That keeps the OHLCV workflow useful for research instead of just fitting noise.

Backtesting guardrails for candle data

  1. Match the candle interval to the decision interval of the strategy.
  2. Use only completed candles when you calculate signals.
  3. Account for exchange fees and realistic slippage in the simulator.
  4. Keep train and evaluation windows separate.
  5. Document any assumptions that cannot be inferred from OHLCV bars alone.

Use the public references below when you wire this into your research stack:

GET /api/v1/ohlcv?coin=BTC&interval=1h&limit=10000

Use the API docs button for the full response contract, then validate your exported ranges against the shared footer references before running large backtests.