Steemfeed-JS - now with real exchange queries and median averages

in witness-category •  2 years ago

As more people are using Steemfeed-JS, I finally took the time to port over my automatic exchange proxy system used by SteemValue (Python), to NodeJS, allowing me to easily query any exchange, and proxy via BTC/USD where needed.

This means witnesses using my script will have a much more accurate pricefeed, as it uses both Poloniex and BTC-e for the BTC/USD calculation, and Polo+Bittrexx for BTC/STEEM. It obtains the median average from the combined sources, helping to prevent price manipulation. It's also been tested to handle exchanges going offline, or returning bad data.

You can obtain the pricefeed from here:

It can be ran as both a normal Node V6 application, with just a few dependencies, or it can be ran within the node:6 docker image as described in the README on the Github.

Current Features

  • Queries multiple exchanges (and more can be added just by writing a small adapter)
  • Uses median average to filter out bad data
  • Allows you to customise the peg percentage in the config file
  • Rather than alter the price directly, it adjusts the quote, allowing sites like SteemDB to display the bias
  • Extremely reliable. I built this after getting tired of the Python version randomly hanging. This script runs for days and never seems to crash or gets stuck.

Do you like what I'm doing for STEEM/Steemit?

Vote for me to be a witness - every vote counts.

Don't forget to follow me for more like this.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

I really like the effort you've put in abstracting the exchanges and the library in general.

I have just released documentation for markets module in steemtools, so Python coders can have the access to the same features. The code is not as nice as yours, but it works...


I used the same kind-of exchange abstraction in SteemValue which is in Python. I would be using that same code for a python price feed, but I've found that python likes to randomly hang when connecting to external sites...


I've added a default timeout of 2s for all requests, to avoid waiting due to networking or other issues.

I've just tipped @someguy123 1 SDB for this work and I'll send another 1 SDB tip if someone else also tip him 1 SDB.