Skip to content

Major updates - Hive Support + flexible exchange configuration

Compare
Choose a tag to compare
@Someguy123 Someguy123 released this 22 Mar 03:15
· 64 commits to master since this release

Not everything is listed below, since there has been a lot of refactoring to make steemfeed-js more flexible,
and there has also been lots of small changes such as cleaning up syntax to make lines more readable.

Overall, this is a major update to steemfeed-js, making the system more flexible, potentially usable across forks of Steem, and cleaner code making it easier to understand and develop steemfeed-js.

New Exchange Adapter

  • Added IonomyAdapter.js, allowing price feeds to include prices from ionomy.com

Various Improvements

  • Refactored handling of config defaults and parsing CLI options into lib/settings.py

  • publish_feed now uses config.base_symbol and config.quote_symbol instead of hardcoded STEEM / SBD

  • Refactored the hardcoded steem / usd default exchange pair lookup into config options config.ex_symbol and config.ex_compare

  • Tons of refactoring to lib/exchange.js to improve the adapter initialisation process.

New Additions

  • New config options

    • ex_symbol - The symbol we're obtaining the price of. Default: steem

    • ex_compare - The symbol we're pricing ex_symbol with (i.e. the other half of the exchange pair). Default: usd

    • base_symbol - The symbol used for the "base": "0.512 SBD" part of the feed. Default: SBD

    • quote_symbol - The symbol used for the "quote": "1.000 STEEM" part of the feed. Default: STEEM

    • disable_exchanges which allows the user to disable one or more exchanges if they're down, or returning bad data.

    • exchanges_no_provide - allowing the user to disable individual coin pairs from being used, per each exchange.

    • exchanges_provide - works similarly to exchanges_no_provide, except it allows new coin pairs to be added to existing exchanges, instead of removing them.

    • network - allows Steemfeed-JS to work with forks, such as Hive

  • Created lib/adapters/base.js, which contains BaseAdapter - an example adapter with comment blocks explaining how you should layout a new exchange adapter.

  • Added has_pair method to all exchange adapters, and added has_pair check in all get_pair methods.

  • Added code attribute to all exchange adapters, a unique short string used as the "ID" for the adapter.

  • Added available_adapters list to lib/exchange.js, allowing adapters to be programatically enabled/disabled etc.

Using Steemfeed-JS with Hive?

Open up your config.json and remove any existing Steem "node" config line. (or change it to https://anyx.io)

Add the config line "network": "hive"

Stop, re-build, and start steemfeed-js, and you'll be broadcasting a Hive feed :)