QMT · 内置 Python成交回报实时主推函数
get_ordererror_callback_cache
获取缓存中的下单错误信息
原型
get_ordererror_callback_cache(datas, ContextInfo)
参数
| 参数 | 类型 | 说明 |
|---|---|---|
| datas | 数据序列 | 结果写入此序列;调用后会取出并清空该缓存。 |
| ContextInfo | object | 策略运行环境对象。 |
返回值
无返回值,结果会返回到datas
示例
以下代码依据官方示例整理缩进,并将旧式 print 写法改为函数调用;账号使用占位值。
def init(ContextInfo):
ContextInfo.set_account('YOUR_ACCOUNT_ID')
set_auto_trade_callback(ContextInfo, False)
def handlebar(ContextInfo):
data = []
get_ordererror_callback_cache(data, ContextInfo)
官方来源
迅投 QMT 官方函数检索表,条目 get_ordererror_callback_cache。本页属于 QMT 内置 Python 接口;原站函数检索表同时收录其他语言,不能按网页路径将本条目误归为 VBA。网页核对日期:2026-10-11。