- Go to docker directory
cd docker
- Generate self-signed certificate for InfluxDB
sudo openssl req -x509 -nodes -newkey rsa:2048 -keyout influxdb-selfsigned.key -out influxdb-selfsigned.crt -days 365
- Copy and modify "dotenv" files from examples
cp influxdb/.env.example influxdb/.env
cp influxdb/.env.secret.example influxdb/.env.secret
- Run database
docker compose --profile database up -d
Check InfluxDB UI at http://YOUR_HOST:8086
- Copy and modify "dotenv" files from examples
cp collector/.env.example collector/.env
cp collector/.env.secret.example collector/.env.secret
- Run collector
docker compose --profile collector up
- Change collector config file in
docker-compose.yaml
historical-candles-collector:
...
command: ["conf/collect_historical_candles/binance.yaml"]
- Modify collector config in
conf/collect_historical_candles
directory
cd ../conf/collect_historical_candles
cat binance.yaml
exhange_kwargs:
class: Binance
symbols: [BTC-USDT, ETH-USDT]
config:
log: {filename: demo.log, level: DEBUG, disabled: False}
candles_kwargs:
method: candles_sync
interval: 1h
start: "2023-08-01T00:00:00"
# end: "2023-08-25T02:00:00"
end: ~
retry_count: 1
retry_delay: 60
For more informaton about *_kwargs, see cryptofeed docs