from datetime import datetime, date
from contextlib import closing
from tqsdk import TqApi, TqSim
from tqsdk.tools import DataDownloader
api = TqApi(TqSim())
download_tasks = {}
download_tasks[“T_tick”] = DataDownloader(api, symbol_list=[“SHFE.rb2005″], dur_sec=0,start_dt=datetime(2020, 1, 21), end_dt=datetime(2020, 2, 4), csv_file_name=”rb2005-01_tick.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() })
用的官方文档示例代码,我想要CTP深度行情所有字段数据,5档委托,涨跌停等等,能不能下到,需要怎么处理,哪里有相关资料?谢谢
from datetime import datetime, date
from contextlib import closing
from tqsdk import TqApi, TqSim
from tqsdk.tools import DataDownloader
api = TqApi(TqSim())
download_tasks = {}
download_tasks[“T_tick”] = DataDownloader(api, symbol_list=[“SHFE.rb2005″], dur_sec=0,start_dt=datetime(2020, 1, 21), end_dt=datetime(2020, 2, 4), csv_file_name=”rb2005-01_tick.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() })
用的官方文档示例代码,我想要CTP深度行情所有字段数据,5档委托,涨跌停等等,能不能下到,需要怎么处理,哪里有相关资料?谢谢