我刚刚发现任何一个网站和 tiingo API 都不再提供基于分钟/小时的数据,
在此处检查并单击以重新采样到 1 分钟: https ://www.tiingo.com/002032/overview
或使用 python 代码测试:
from tiingo import TiingoClient
config = {}
# To reuse the same HTTP Session across API calls (and have better performance), include a session key.
config['session'] = True
# If you don't have your API key as an environment variable,
# pass it in via a configuration dictionary.
config['api_key'] = "xxxxxxxx Your Key xxxx"
# Initialize
client = TiingoClient(config)
dfTinngo = client.get_dataframe('002032', startDate='2021-11-8', frequency='1Min')
可以更改频率并用 30 分钟、1 小时重新测试,但它们都不起作用我得到如下错误代码:
KeyError: "None of ['date'] are in the columns"