Witness Price Feed v2.0 for Hive and Steem

in HiveDevs11 months ago (edited)

This a major update to the price feed script I had written in Node JS (https://hive.blog/witness-category/@drakos/steemjs-tools-witness-price-feed-in-nodejs). It relies on Steem-JS, therefore it supports both the Hive and Steem blockchains out of the box without any further modifications to the library.

This v2.0 release can be found here:
https://github.com/Jolly-Pirate/pricefeed/releases/tag/v2.0

Features

  • Application resilience with NodeJS restart on crash/exit.
  • Automatic RPC switching.
  • Supported exchanges: Binance, Bittrex, Huobi, Ionomy, Poloniex, Probit, Upbit.
  • USDT/USD correction.

New features

  • Added two more exchanges that recently listed Hive (Ionomy and Probit).
  • Implemented Volume Weighted Average Price (VWAP) in the calculation.
  • Improved error handling, e.g. when an exchange is unreachable or doesn't return a result.
  • JS code linting.

Update Instructions

There are many improvements and modifications, so I recommend you start with a fresh copy of the tool to avoid any mixups or misconfigurations. Stop your older price feed process/docker and delete its folder. Reclone the repo and follow the fully documented instructions.
https://github.com/Jolly-Pirate/pricefeed/tree/v2.0

git clone https://github.com/Jolly-Pirate/pricefeed
cd pricefeed
git checkout v2.0


Available & Reliable. I am your Witness. I want to represent You.

🗳 If you like what I do, consider voting for me 🗳

Vote

Check my guide about Voting for Witnesses.
Go to https://wallet.hive.blog/~witnesses. Find my name and click the vote button.
Alternatively you can use Hivesigner to vote for me or set me as proxy

Sort:  

It doesn't work for me.

After ./run.sh
I get this error >>>
Screenshot from 20200401 220017.png

but as you can see I have enabled only hivechain >>>
Screenshot from 20200401 220044.png

Any idea what I make wrong @drakos ?

 11 months ago (edited)

https://github.com/Jolly-Pirate/pricefeed#docker-install-recommended

You didn't install jq ;)
sudo apt install -y jq

Love the logo conversion. That is awesome!

 11 months ago 

Thanks.

keep up the good work

Enable only one blockchain in the app/config.json file, hivechain or steemchain, then restart

Getting this when tried to have Hive and Steem. With only hive its working fine .. any idea why ?

 11 months ago 

You can't run both at the same time.