I've got a great idea for a little Python library you could make: a very quick little function that returns the USD value of Hive on a given date or down to the nearest hour. Looking up data from @coingecko should be easy.
I actually need a function like this but I'm not sure when I'll get around to writing it.
I use
yfinance
to get stocks/crypto prices. The following code gets the Hive prices.import yfinance as yf import datetime as dt import pandas as pd from pandas_datareader import data as pdr def get_price_df(ticker, days=365, interval='1d'): #interval - data interval (intraday data cannot extend last 60 days) #Valid intervals. Valid intervals are: 1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3mo end_date = dt.datetime.now() start_date = end_date - dt.timedelta(days=days) df = pdr.get_data_yahoo(ticker, start_date, end_date, interval=interval) return df if __name__ == '__main__': yf.pdr_override() ticker = 'HIVE-USD' df = get_price_df(ticker) print(df)
Python to the world