feat(Data): downloading data for pre-defined tickers

This commit is contained in:
Mark Aron Szulyovszky
2021-11-09 15:21:22 +01:00
parent 58137a0f36
commit 51b7d35660
19 changed files with 21632 additions and 42 deletions
+20
View File
@@ -0,0 +1,20 @@
#%%
import pandas as pd
from utils.get_prices import get_crypto_price_crypto_compare, get_stock_price_av
#%%
crypto_tickers = ["BTC", "ETH", "BNB", "ADA", "SOL", "XRP", "DOT", "LTC", "UNI", "TRX", "FIL"]
etf_tickers = ["GLD", "IEF", "TLT", "SPY", "QQQ"]
tickers = crypto_tickers + etf_tickers
#%%
for ticker in tickers:
print("Fetching ", ticker)
if ticker in crypto_tickers:
df = get_crypto_price_crypto_compare(ticker, "USD", 1500)
else:
df = get_stock_price_av(ticker, "2017-11-10")
df.to_csv(f"data/{ticker}.csv", index=True)
# %%