Choose Your Exchanges
The initial version of the witness price feed tool I published a few days ago pulled the current STEEM price from CoinMarketCap.com, which is nice because it provides a USD value for STEEM based on an average across all of the exchanges on which it's listed.
I realized that it also includes the STEEM/KRW pair listed on UpBit which always trades at a pretty significant premium over pairs on other exchanges. This makes the price published by my feed tool always a bit higher than what most other witnesses are publishing.
I'm not going to say whether it's right or wrong to use the STEEM/KRW pair from UpBit when publishing your price feed - that's up to each witness to decide for themselves - but the tools should at least provide different options.
So I have updated my witness price feed tool at https://github.com/MattyIce/pricefeed to allow witnesses to choose from Bittrex, Poloniex, Binance or all of the above, if they don't want to use the default of CoinMarketCap.com.
To choose which exchanges to use, set the new "exchanges" property in the config.json file like so:
"exchanges": ["bittrex", "poloniex", "binance"]
In the example above, the tool will pull the current STEEM price from all three exchanges listed and publish the average price between the three. If you just want to use one exchange, then only add that one to the list. It will pull prices from whatever exchanges are listed in the "exchanges" array and publish the average price.
If the "exchanges" property is null or empty then it will default back to using CoinMarketCap.com's average price.
Update Instructions
For those of you already running the previous version of the price feed tool, you can just run the following commands to pull and run the latest update (in the 'pricefeed' directory):
$ git pull
Edit config.json and add the "exchanges" property with the list of exchanges you would like to use, and then restart the program using:
$ pm2 restart feed
Price Calculation Details
To add a little more detail for those who are interested, CoinMarketCap.com is very simple since it provides a price API for each coin it lists in USD. So it's one call, grab the price, and you're done. The other exchanges are a bit more involved since they don't publish prices for STEEM directly in USD.
For Bittrex the tool will pull the STEEM price in BTC and then pull the BTC price in USD and multiply the two to get the current STEEM price in USD.
For Binance and Poloniex, they do not trade anything in USD so for those I used the BTC-USDT pair as a proxy for the USD price of Bitcoin and then multiplied by the STEEM/BTC price to get the USD price of STEEM.
If anyone knows a better way of doing this, please let me know!
Thanks for your support!
As always I want to thank everyone who has supported my work. It would not be possible without you! Hopefully this tool will help other Steem witnesses run a stable and reliable price feed that doesn't require much maintenance, and now also provide more options to choose which exchange or set of exchanges provide the most accurate pricing for STEEM.
Links to relevant commits:
Posted on Utopian.io - Rewarding Open Source Contributors