A python script to take all of the daily "close" prices of steem for the last 30 days.
This little script was fun to hack together, i learned some new concepts dealing with APIs, the requests library, and working with some JSON files. I'm pretty new to Python so don't be too harsh on me, but I would like some feedback!
Would you let me know in the comments , what kind of information about steem you would find useful to have?
I'm thinking about comparing the data, displayed in a percentage for the price and average volume changed from 30 days back and 60 days back but, i'm not sure. I want YOUR opinion!
$1.82 is the average price
Now to the source code:
import requests; import time
import json
r = requests.get('https://min-api.cryptocompare.com/data/histoday?fsym=STEEM&tsym=USD&limit=30&aggregate=0&e=CCCAGG')
data1 = json.loads(r.text)
coin_price = []
for coin in data1.get('Data'):
price = coin.get("close")
coin_price.append(float(price))
total = sum(coin_price) / 30
print("Steem's average price over last 30 days: ${}".format(round(total,2)))