import os
import sys
from dotenv import load_dotenv
%load_ext dotenv
%dotenv
from alpha_vantage.timeseries import TimeSeries
ts = TimeSeries(key=os.getenv('ALPHAVANTAGE_API_KEY'),
output_format='pandas',
indexing_type='date')
dfav_AAPLts_v2, meta_data = ts.get_daily(symbol='S&P', outputsize='full')
dfav_AAPLts_v2.head()