Published: 15 Jul 2017 › Updated: 15 Jul 2017![[Python]Average price of Steem for the last 30 Days.](https://i.ecency.com/p/CQdwDW6BZfWYLS7GERbwYb7Q5mR4xgERs3wkGNbL54XwdmDGziLXAj73Ce2EWni?format=match&mode=fit&height=377)
[Python]Average price of Steem for the last 30 Days.
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)))Leave [Python]Average price of Steem for the last 30 Days. to:
Read more #steem posts
Best Posts From vidallia
We have not curated any of vidallia's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From vidallia
- STEEM MOONING! But Stay Humble!
- Blah
- [Steempy v0.0.4] A Steem Price Bot written in Python
- [Steempy v0.0.3] Steem price bot written in Python!
- A Steem price watching bot written in Python!
- [Python]Average price of Steem for the last 30 Days.
- Adventure to the River! A Photo Story
- EOS Is Not A Scam!
- Staying Motivated While Surrounded by Careless People! [Story Time]
- [Python3] I made my first class! Feedback please.