已解决1.10K 浏览
0

你好,

我在加载期货合约2020~2021的历史kline数据的时候,许多合约显示不存在。截图中我已经把起始时间调的很靠前了也不行。请帮忙看一下。

比如INE.lu2001,INE.lu2009…..

wintondata 选择最佳答案 2022年11月30日
1

我测了下代码没啥问题,你先不传入变参,定参试下,我是从2016到2022这么长的时间段也能下

wintondata 选择最佳答案 2022年11月30日

代码如下,还是报错“Exception: 查询合约服务报错 failed to execute graphql operation, errors: [variable instrument_id: [DCE.pg2004] contains non-existent instrument: DCE.pg2004]”
请问是否与我的账号有关,我的账号是wintondata。

download_tasks={‘0′:
DataDownloader(api=api, symbol_list=’DCE.pg2004’, dur_sec=60, start_dt=datetime.strptime(‘2016-01-01’, “%Y-%m-%d”), end_dt=datetime.strptime(‘2022-04-01′, “%Y-%m-%d”), csv_file_name=’pg2004.csv’)
}

with closing(api):
while not all([v.is_finished() for v in download_tasks.values()]):
api.wait_update()
print(“progress: “, { k:(“%.2f%%” % v.get_progress()) for k,v in download_tasks.items() })

sorry,这个合约代码有问题,请忽略