无法从 Alpha Vantage API 获取实时价格.价格是一天前的 [英] Fail to get real time prices from Alpha Vantage API. Prices are one day old
问题描述
我正在尝试从 Alpha Vantage API 获取最新的盘中价格.目前是东欧时间周五晚上 9 点 16 分.我正在尝试获得特斯拉股票.市场仍然开放.但是,API 调用仅返回我昨天的数据.可能是什么问题?
I am trying to get the latest Intraday prices from Alpha Vantage API. Currently it is Friday, 9:16PM Eastern European Time. I am trying to get Tesla stock. Markets are still open. However, The API call returns me yesterday's data only. What could be the problem?
ts = TimeSeries(key='API_KEY', output_format='pandas')
data, meta_data = ts.get_intraday(symbol='TSLA',interval='1min', outputsize='full')
print(data.head(5))
print(meta_data)
1. open 2. high 3. low 4. close 5. volume
date
2020-04-16 16:00:00 746.06 746.830 745.530 745.6800 83342.0
2020-04-16 15:59:00 746.57 746.715 745.090 746.1958 53268.0
2020-04-16 15:58:00 746.90 747.465 746.490 746.6250 36746.0
2020-04-16 15:57:00 747.52 747.760 746.827 747.2147 25910.0
2020-04-16 15:56:00 747.95 747.990 746.800 747.2800 33869.0
{'1. Information': 'Intraday (1min) open, high, low, close prices and volume', '2. Symbol': 'TSLA', '3. Last Refreshed': '2020-04-16 16:00:00', '4. Interval': '1min', '5. Output Size': 'Full size', '6. Time Zone': 'US/Eastern'}
1. open 2. high 3. low 4. close 5. volume EMA
推荐答案
我也注意到了这一点并联系了 Alpha Vantage.我收到了这样的回复:
I also noticed this and contacted Alpha Vantage. I got this response:
感谢您的联系!对于在纳斯达克上市的证券,例如 MSFT,我们的 API 平台上的数据每天都会在美国东部时间下午 4:30 刷新.
Thank you for reaching out! For Nasdaq-listed securities such as MSFT, the data is refreshed daily at 4:30pm ET on our API platform.
因此看起来没有为纳斯达克上市项目提供实时数据.这可能是这里的问题.
So looks like real-time data is not provided for Nasdaq-listed items. This could be the issue here.
这篇关于无法从 Alpha Vantage API 获取实时价格.价格是一天前的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!