We have decided to give EVERYTHING for free! What are you waiting for?

LOGIN

Updating your historical data is a must in order to create a reliable strategy when doing algorithmic trading.

Initially, it’s good that you have a default configuration file for this purpose, which has to contain all pairs of data you want to download, say USDT or BTC or ETH.

Bash Script

We’ll assume you have your freqtrade folder in your home folder.

  • For our bash script we’ll create an empty file in your home folder with name “download-data” and copy-paste the script below
  • Modify the initial variables to match your desired configuration
  • $ chmod +x download-data (this will make the script executable)
#!/bin/bash
#Replace the following variables to match your own environment
#---------------------
CONFIG=algo.json
TIMEFRAMES='15m 1h 4h 6h 12h 1d 1w'
EXCHANGE=binance
#---------------------
echo "starting downloading data"
cd ~/freqtrade/ 
freqtrade -c /home/$USER/freqtrade/$CONFIG download-data -t $TIMEFRAMES --days 9 --exchange $EXCHANGE
Run the script once by typing $ ./download-data on your terminal with –days 10000 so you can get all the data, then using –days 9 every week you’ll get only fresh data rather than try to re-download partial missing information. For details check this comment by xmatthias here

Crontab

We’ll be using crontab in order to execute a bash script that will run freqtrade with the command to download all the historical data you want from a specific config file.

  • $ crontab -e
  • Type in the following line
    0 0 * * 0 /home/$USER/download-data

That command will then execute every week at 12 AM on at the beginning of the week and proceed to download all the historical data of the pairs included in your json file.

Using Historical Data

The data downloaded by freqtrade is on ~/freqtrade/user_data/data/exchange. There are multiple ways to use it:

  • You can download it to your data analysis station and run statistics on it by hand
  • You can use it to backtest within freqtrade.

Leave a Reply

Your email address will not be published. Required fields are marked *

Privacy Settings
We use cookies to enhance your experience while using our website. If you are using our Services via a browser you can restrict, block or remove cookies through your web browser settings. We also use content and scripts from third parties that may use tracking technologies. You can selectively provide your consent below to allow such third party embeds. For complete information about the cookies we use, data we collect and how we process them, please check our Privacy Policy
Youtube
Consent to display content from Youtube
Vimeo
Consent to display content from Vimeo
Google Maps
Consent to display content from Google
Spotify
Consent to display content from Spotify
Sound Cloud
Consent to display content from Sound
Cart Overview