Steem 市场价和喂价过去7天走势比较: 2019-04-30

in #cn5 years ago

Steem 市场价和喂价过去7天内的变化, 报价取样数据为每小时:

附上数据采集的python脚本,每小时运行一次脚本,小时数据就会采集到 json文件。

def collect_data():
    coinmarketcap = Market()
    cont=Converter();
    s = Steem()

    #get steem feed_price
    feed_price = s.get_current_median_history_price()['base']
    feed_price= float(feed_price.split()[0])

    #get steem market_price
    Steem_market_price_USD= float(coinmarketcap.ticker('steem', convert='USD')[0]['price_usd'])

    steemit_data_history_hour.update({str(datetime.utcnow())[:-7]:{
                                      'steem_feed_price':reward_data[0],
                                      'Steem_market_price_USD':Steem_market_price_USD,
                                      }
                                      })
    with open('steemit_data_history_hour.json', 'w') as fp:
        json.dump(steemit_data_history_hour,fp, indent=4,default=str)
Sort:  

Congratulations @xiguang! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You published more than 950 posts. Your next target is to reach 1000 posts.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.27
TRX 0.12
JST 0.031
BTC 67738.65
ETH 3810.43
USDT 1.00
SBD 3.74