Algorithms, Blockchain and Cloud

Steem Blockchain Information: API, Discord and Wechat!


I have wrapped some useful information about steem blockchain via the Steem-Python library into the following:

import json
from steem import Steem
from steem.converter import Converter
from nodes import steem_nodes
import datetime

steem = Steem(nodes = steem_nodes)
converter = Converter(steemd_instance = steem)
ticker = steem.get_ticker()
market_price = (float(ticker['lowest_ask'])*0.5+float(ticker['highest_bid'])*0.5) 
feed_price = converter.steem_to_sbd(1.0)
time = datetime.datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%S')

x = {
  "last_irreversible_block_num": steem.steemd.last_irreversible_block_num,
  "head_block_number": steem.steemd.head_block_number,
  "account_num": steem.steemd.get_account_count(),
  "feed_price": feed_price,
  "market_price": market_price,
  "time": time
}

print(json.dumps(x))

And these steem blockchain information can be easily obtained via:

Steem Infor API

And also other API servers:

https://helloacm.com/api/steemit/info/

which returns JSON-encoded data:

{"last_irreversible_block_num": 21186204, "hardfork_version": "0.19.0", "time": "2018-04-01T13:12:31", "feed_price": 1.521, "account_num": 904077, "head_block_number": 21186221, "market_price": 1.0168675809782273, "version": {"steem_revision": "e2560ea524b80a865fd468c8947f927f0ffbeb2d", "blockchain_version": "0.19.2", "fc_revision": "8dd1fd1ec0906509eb722fa7c8d280d59bcca23d"}}

Discord Bot – steemit

steemit-discord-infor

Adding steemit to your discord channel is easy:

https://discordapp.com/oauth2/authorize?client_id=418196534660694037&permissions=522304&scope=bot

Wechat Channel – justyyuk

steemit-wechat-infor

Support me and my work as a witness by voting for me here!, Thank you very very much!

–EOF (The Ultimate Computing & Technology Blog) —

399 words
Last Post: SteemTools Update: Adding Account Witness Data, Option to Save Key and Bug Fixes
Next Post: SteemTools Update: Account Profile Lookup + Steem Blockchain Information

The Permanent URL is: Steem Blockchain Information: API, Discord and Wechat! (AMP Version)

Exit mobile version