To install the system just clone and build it!
$ git clone git@github.com:hermeznetwork/price-updater-service.git
$ cd price-updater-service/
$ go build -o priceupdater # or other name that you want
Before execute this steps, you should configure the service.
# First, define the priority execution of providers
$ priceupdater change-priority --priority bifinex,uniswap
# Second, load the configuration to providers
$ priceupdater update-config --provider bitfinex --configFile pathToConfig.json
$ priceupdater update-config --provider uniswap --configFile pathToConfig.json
# Third, create a Key for API
$ priceupdater setup-apikey --apiKey Th3P0w3r4p1K3y
- Copy service file to systemd folder:
$ sudo cp etc/priceupdater.service /etc/systemd/system/
- Reload the services file to include the Price Updater service
$ sudo systemctl daemon-reload
- Start the Price Updater service
$ sudo systemctl start priceupdater.service
- To enable the Price Updater service on every reboot
$ sudo systemctl enable priceupdater.service
- To disable the Price Updater service on every reboot
$ sudo systemctl disable priceupdater.service