How to Get Backtest Data from Binance

Backtesting helps you evaluate a strategy using historical market data before risking real funds. This page explains the recommended and simplest method to obtain OHLCV (candlestick) data from Binance using the official Binance Data Portal (data.binance.vision) and prepare it for the Prime Trading Bot backtest module.

Step 1 — Choose symbol & timeframe

  1. Decide which trading pair you want to test, e.g. BTCUSDT, ETHUSDT, BNBUSDT.
  2. Pick the candle interval that matches your bot configuration: 1m, 5m, 15m, 1h, 4h, 1d.

Step 2 — Download data from Binance Data Portal

  1. Open the Binance Data Portal: https://data.binance.vision.
  2. Navigate: Data → Spot → Kline (Candlestick).
  3. Find the symbol and interval you need (the site lists files by pair and timeframe).
  4. Select the time range / year(s) you want and download the ZIP file(s).
  5. Extract the ZIP file(s) to get the CSV file(s) containing historical klines.

Step 3 — Prepare CSV for the bot

The backtest module expects CSV with these columns, in this order:

timestamp, open, high, low, close, volume

Notes:

Step 4 — Verify data quality

Step 5 — Run the backtest in the GUI

  1. Open the Prime Trading Bot Client (GUI).
  2. Go to the Backtest or Run Backtest section.
  3. Select the CSV file you prepared and upload it.
  4. Choose the same strategy/settings you want to test (indicators, TP/SL, Safety Orders).
  5. Start the backtest and wait for the results to appear in the Report Tab.
Tip: Use at least 3–6 months of data for mid-short term strategies, and 12+ months for longer-term evaluation. More data yields more reliable performance estimates.

CSV example (first row)

timestampopenhighlowclosevolume
162250560000035700.0035850.0035600.0035800.00123.45

Troubleshooting

Useful Links