RomelTorres / alpha_vantage

A python wrapper for Alpha Vantage API for financial data.
MIT License
4.3k stars 741 forks source link

entitlement set to None and can not pass 'realtime' #379

Closed inet100 closed 3 months ago

inet100 commented 3 months ago

entitlement is set to None and can not pass 'realtime' to get real time data on premium membership plan.

AlphaVantageSupport commented 3 months ago

Can you please provide some sample code to reproduce the issue?

inet100 commented 3 months ago

There is no premarket data with premium subscription when using this code:

`symbols = ['ADD', 'XMTR', 'MGOL', 'WENA', 'LUMN'] async def get_data(symbol): ts = TimeSeries(key='KJN5K3RUQIX10NS3', output_format='pandas')

data, _ = await ts.get_quote_endpoint(symbol)

data, _ = await ts.get_intraday(symbol=symbol,interval='1min', outputsize='full')
data['symbol'] = symbol
await ts.close()
return data

loop = asyncio.get_event_loop() tasks = [get_data(symbol) for symbol in symbols] group1 = asyncio.gather(*tasks) results = loop.run_until_complete(group1) loop.close() print(results)`

adding entitlement='realtime' generates error data, _ = await ts.get_intraday(symbol=symbol,interval='1min', outputsize='full', entitlement='realtime')

After downloading all files and editing timeseries.py and importing locally it works well. def get_intraday(self, symbol: str, interval:str='15min', outputsize:str='compact', month:str=None, extended_hours:str='true', adjusted:str='true', entitlement='realtime'):

Disclaimer: I'm amateur programmer :)

AlphaVantageSupport commented 3 months ago

OK, we will keep this issue open to see if there are corroborating data points. Thank you!

AlphaVantageSupport commented 3 months ago

Close the issue for now. Will reopen if more users are facing similar issues