求助:调取豆粕主力合约失败
您好,我打算调用主力合约。
g.code = [GetMainContract('DCE', 'm',20), GetMainContract('CZCE', 'RM',20) ]
但是,提示获取不到行情数据。
WARN - 没有获取到任何行情, Function[GetQuote], Code[m2105.DCE]
2021-04-09 11:56:34.834 - 2021-02-26 21:00:00.000 - ERROR - Traceback (most recent call last):
File "./Envelop.py", line 101, in OnBar
return Main.OnBar(context, code, bartype)
File "", line 144, in OnBar
IndexError: list index out of range
您尚未登录,请 登录 真格量化发表回复
21:00刚开盘的时候还没有行情,所以没有拿到数据,应该是这个原因