Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Latest commit

 

History

History
58 lines (40 loc) · 1.35 KB

SETUP_PRICE_UPDATER.md

File metadata and controls

58 lines (40 loc) · 1.35 KB

Setup Price Updater

Instalation

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

Running as Linux Service

Before execute this steps, you should configure the service.

Quick Guide

# 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
  1. Copy service file to systemd folder:
$ sudo cp etc/priceupdater.service /etc/systemd/system/
  1. Reload the services file to include the Price Updater service
$ sudo systemctl daemon-reload
  1. Start the Price Updater service
$ sudo systemctl start priceupdater.service
  1. To enable the Price Updater service on every reboot
$ sudo systemctl enable priceupdater.service
  1. To disable the Price Updater service on every reboot
$ sudo systemctl disable priceupdater.service