This article is targeted at developers. Primarily witnesses. If you don't understand what a witness is, or why a price feed is needed, read my article explaining witnesses
Due to recent changes in @xeroc's Piston, @jesta's witness price feed isn't working correctly.
While I'm not a big fan of Javascript, @svk's SteemJS-lib is pretty good. I used it to build Steemfeed-JS, which is a witness price feed in Javascript. It does NOT require cli_wallet
, it should work across Windows, OSX, and Linux, with all dependencies in JS (just like @jesta/@clayop's).
The price data is retrieved from my service, Steem Value, since it offers direct steem_usd
prices via the JSON API. If people want to add more exchanges, they can submit a Pull Request.
How to install?
The source code is up on Github: https://github.com/Someguy123/steemfeed-js/
It requires Node v6. However I've also packaged it up with Docker for quick setup on most platforms.
First, download the git repository, then edit config.json as needed. The interval is in minutes.
git clone https://github.com/Someguy123/steemfeed-js.git
cd steemfeed-js
cp config.example.json config.json
nano config.json
Now, you can run it either with Node v6, or through Docker (recommended).
Using docker:
docker build -t steemfeed-js .
docker run -it --rm --name feed steemfeed-js
# Check the status with docker logs
docker logs feed
Using NodeJS:
# I recommend using NVM to manage NodeJS versioning
nvm use v6
npm install
npm start
Small side note:
If you see a warning like this:
WARNING! ws connection wss://node.steem.ws closed
WebSocket: will try to reconnect in 1 sec, attempt #1
connecting to wss://node.steem.ws
This is not an error. This is simply STEEM.WS disconnecting after 60 seconds of being idle. The script will still function with no problems at all.
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.