- Bittrex
- Poloniex
- Openledger (BTS-STEEM, Open.BTC-STEEM)
- Bitfinex
- Gdax(coinbase)
- Okcoin
- Bitstamp
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 websocket-client
sudo pip3 install requests
sudo pip3 install pycrypto
sudo pip3 install pyyaml
sudo pip3 install steem
(if you got an error during installing steem, run sudo pip3 install upgrade pip
)
You can find more info about steem
here
Then, edit ~/.steemd/config.ini
and make sure to add required APIs:
plugin = p2p json_rpc webserver witness database_api witness_api condenser_api network_broadcast_api block_api
Copy the code in this link and paste as steemfeed.py
in your witness server.
Then, edit steemfeed_config.yml
to configure. It has some items under Config category in the code.
discount
: Discount rate (e.g. 0.10 means published price feed is 10% smaller than market price)interval_init
: Feed publishing interval in secondsrand_level
: Degree of randomness of intervalfreq
: 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.min_change
: Minimum price change percentage to publish feedmax_age
: Maximum age of price feedbts_ws
: List of BitShares Websocket serverswitness
: Enter YOUR WITNESS ID herewif
: Leave it empty. You will add your key with encryption when run the script first time
Then, run this code in a separate screen
screen -S steemfeed
python3 ./steemfeed.py
(If it gives you permission error, run in sudo
)