CoinStats - A NodeJS Cryptocurrency Statistic Bot - Automatic posting to Steemblockchain
utopian-io·@moonrise·
0.000 HBDCoinStats - A NodeJS Cryptocurrency Statistic Bot - Automatic posting to Steemblockchain
 ### About CoinStats is a NodeJS Cryptocurrency Statistic Bot for Steemit or other Platforms. CoinStats retrieves the last 24 hours of historical data for specified coins and generates line chart images from them. These images are uploaded directly to the LBRY Blockchain and a Markdown File is generated, which is uploaded to Steemit. ### New Features #### What feature(s) did you add? V.0.2 removes the vertical axis grid lines from all charts, to make them overall beautifuler. Also another minor change was to increase the wait time between uploading images into to LBRY blockchain. The timeout is now set to 90 seconds and should remove all `502 Bad Gateway` errors. e.g.  The major change of V.0.2 was the implementation of automatic posting to the steemit blockchain. Now when markdown is generated it will be automatically uploaded to your steemit account. #### How did you implement it/them? ##### Beautifuler Graphs - [See GitHub Commit](https://github.com/caspernikus/CoinStats/commit/eaa6cb9ac50783f1256e04ddc67f53bcfe69318b#diff-168726dbe96b3ce427e7fedce31bb0bcR303) ##### Increased Timeout - [See GitHub Commit](https://github.com/caspernikus/CoinStats/commit/eaa6cb9ac50783f1256e04ddc67f53bcfe69318b#diff-168726dbe96b3ce427e7fedce31bb0bcR285) ##### Uploading to Steem Blockchain The library SteemJS was used to broadcast the new comment, also I changed the code logic a little bit to provide valid json_metadata infos. ``` javascript function broadcastToSteemBlockchain(data, timestamp) { const json_metadata = { "tags": [ "coin", "cryptocurrency", "bitcoin", "steem", "crypto" ], "links": data.links, "image": data.images, "format": "markdown", "app": "coinstats\/0.2" }; steem.broadcast.comment( config.private_posting_key, '', 'coin', config.account, timestamp + '-coinstats-daily-cryptocurrency-statistic-service', 'CoinStats - Daily Cryptocurrency Statistic Service', data.markdown, json_metadata ); } ``` Shows the actual broadcast method. In the same turn I have a added a config file to provide informations about the account, it's posting_key, and the steem api endpoint. - [See GitHub Commit](https://github.com/caspernikus/CoinStats/commit/eaa6cb9ac50783f1256e04ddc67f53bcfe69318b#diff-168726dbe96b3ce427e7fedce31bb0bcR4) ### Roadmap - V.0.1: - Markdown File generation - Chart generation - Upload to LBRY Blockchain - V.0.2: - Create directly Steemit Post - Better Charts - V.0.3: - Bar Charts shows only percentage change over last week - Toggle Steemit auto posting via config - V.1.0: - More information (e.g different Charts for each Coin) - Running on a Server and automatically post every day - Custom messages for the coins - Better overall layout ### PROOF for GitHub Account benediktveith [Click here :)](https://utopian.io/utopian-io/@moonrise/added-code-highlighting-or-added-code-block-toolbar-button-or-fixed-code-block-bug) <br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@moonrise/coinstats-a-nodejs-cryptocurrency-statistic-bot-automatic-posting-to-steemblockchain">Utopian.io - Rewarding Open Source Contributors</a></em><hr/>