AlgoTrader uses the time series database InfluxDB for the storage of historical data. InfluxDB is an open-source database written in Go specifically designed to handle time-series data with high availability and high performance requirements.
For detailed information on InfluxDB please have a look at the InfluxDB Documentation.
There are 3 ways of inserting historical data into AlgoTrader InfluxDB:
1. From a CSV file, directly to Influx. It can be done by the following command:
'<path_to_AT_installation_folder>\influxdb\influx.exe' -import -path <path_to_file>
The file format for bar data should be as following:
# DML # CONTEXT-DATABASE: algotrader bar,securityId=25,connectorDescriptor=Interactive\ Brokers\ -\ Native,barSize=MIN_1 open=1.30319,high=1.30402,low=1.30319,close=1.30367,vol=0 1324245720000000000 bar,securityId=25,connectorDescriptor=Interactive\ Brokers\ -\ Native,barSize=MIN_1 open=1.30369,high=1.30369,low=1.30351,close=1.30352,vol=0 1324245780000000000 bar,securityId=25,connectorDescriptor=Interactive\ Brokers\ -\ Native,barSize=MIN_1 open=1.30353,high=1.30383,low=1.30353,close=1.30382,vol=0 1324245840000000000
Please be aware that influx expects Unix (LF) end of line in this file.
2. Using Historical Data Manager UI:
HDM is available after selecting the Hist Data tab on the left side menu and Historical Data Import from HDM panel:
AT supports multiple formats here, each of them after selecting CSV type is shown in format sample.
More details on HDM can be found in our documentation:
3. Using script.
You can also easily connect to the influx e.g. using python. This allows you to write a mapping script that can adjust your current data to the format that AT expects and insert those data directly into Influx. More details on python-influx setup can be found here: