Steemfeed - Simple Price Feed Python Script
Preparation
To use this price feed script, the following dependencies and packages should be installed.
sudo apt-get install libffi-dev libssl-dev python3-dev python3-pip
sudo pip3 install python-dateutil
sudo pip3 install steem
In addition, you should run cli_wallet by using the following command
cli_wallet -s ws://localhost:8090 -H 127.0.0.1:8092 --rpc-http-allowip=127.0.0.1
Plus, unlock your cli_wallet before using it.
Installation
Copy the code in this link and paste as steemfeed.py
in your witness server.
Configuration
Then, edit the steemfeed.py
to configure. We have four items under Config category in the code. interval, freq, null_price, witness
interval
: Interval of publishing price feed. The default value is one hour (3600 seconds)freq
: Frequency of parsing trade history. Please be noticed that it can parse only 200 last trading history (Bittrex), so as trading is active you may need to decrease this frequency value.witness
: Enter YOUR WITNESS ID herenull_price
: Set this manually to the current price.
Run
Then, run this code in a separate screen
screen -dmS steemfeed python3 ./steemfeed.py
Good job!
You may like to add that the wallet needed to be unlocked.
Thanks for the input. Done!
The feed is updated with some major improvements and resolving effective bugs. Please visit here:
https://github.com/clayop/steemfeed
Special thanks to @xeroc for his invaluable efforts!
Thanks clayop, I had an issue getting it to work until a ran it in a separate screen session as opposed to a separate screen window.
If you vote for witness
clayop
, I would really appreciate!Thanks for the write up! Using this now.
Testing :)