Код: Выделить всё
def datafromav():
sourcefile = open('dataone.txt', 'a')
pd.set_option('display.max_rows', 999)
from alpha_vantage.timeseries import TimeSeries
import time
api_key = 'XXXXXXXX'
ts = TimeSeries.HISTORICAL_OPTIONS(key=api_key, output_format='pandas')
STOCKS = [substock]
data, meta_data = ts.HISTORICAL_OPTIONS(symbol=STOCKS, outputsize = 'compact')
print(data, file = sourcefile)
sourcefile.close()
Код: Выделить всё
AttributeError: type object 'TimeSeries' has no attribute 'HISTORICAL_OPTIONS'
Подробнее здесь: https://stackoverflow.com/questions/790 ... phavantage