Steem Blockchain Information: API, Discord and Wechat!

in #witness-category6 years ago (edited)

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:

API

And also other API servers.

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

which returns JSON-encoded:

{"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

image.png

Adding steemit to your discord channel is easy:

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

Wechat Channel - justyyuk

image.png

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

Sort:  

I would like to be able to analyze steemit using Python. However, I have not studied Python yet. I thought that it might be useful information in the future. I resteemed this post. Thank you.

Thank you.

after I see your work. you are great at performing your task. I am from Indonesia and want to choose you as a witness. and hopefully I become the first person in Indonesia to choose you as a witness

thank you very much.

can i contact you to ask you more

Coin Marketplace

STEEM 0.18
TRX 0.14
JST 0.030
BTC 58613.96
ETH 3153.58
USDT 1.00
SBD 2.43