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

Update token prices for a specific hermez node from a specific price updater service

Notifications You must be signed in to change notification settings

hermeznetwork/tool-update-token-prices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tool-update-token-prices

Update token prices for a specific hermez node from a specific price updater service

Requirements

  • Hermez node postgres database with tokens registered in table Token
  • Price updater service
  • Flags have priority over Environment variables

How it works

  • Load all tokens from table token
  • Get token prices from price updater service
  • Update prices on table token

How to use

Compile it from the root dir of this repo:

go build -o update-price ./...

Set the env variables and run:

POSTGRES_HOST="" POSTGRES_PORT="" POSTGRES_USER="" POSTGRES_PASSWORD="" POSTGRES_DATABASE="" PRICE_UPDATER_URL="" PRICE_UPDATER_API_KEY="" ./update-price

OR

Set the values from the flags

./update-price -POSTGRES_HOST="" -POSTGRES_PORT="" -POSTGRES_USER="" -POSTGRES_PASSWORD="" -POSTGRES_DATABASE="" -PRICE_UPDATER_URL="" -PRICE_UPDATER_API_KEY=""

About

Update token prices for a specific hermez node from a specific price updater service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages