Skip to content

romanzes637/cryptofeed-influxdb

Repository files navigation

Cryptofeed with InfluxDB backend

Database

  1. Go to docker directory
cd docker
  1. Generate self-signed certificate for InfluxDB
sudo openssl req -x509 -nodes -newkey rsa:2048 -keyout influxdb-selfsigned.key -out influxdb-selfsigned.crt -days 365
  1. Copy and modify "dotenv" files from examples
cp influxdb/.env.example influxdb/.env
cp influxdb/.env.secret.example influxdb/.env.secret
  1. Run database
docker compose --profile database up -d

Check InfluxDB UI at http://YOUR_HOST:8086

Collector(s)

  1. Copy and modify "dotenv" files from examples
cp collector/.env.example collector/.env
cp collector/.env.secret.example collector/.env.secret
  1. Run collector
docker compose --profile collector up
  1. Change collector config file in docker-compose.yaml
historical-candles-collector:
  ...
  command: ["conf/collect_historical_candles/binance.yaml"]
  1. 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

About

Cryptofeed with InfluxDB backend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published