get_history_trade_detail_data - 查询历史交易明细
get_history_trade_detail_data 是 QMT 内置 Python 中用于查询历史交易明细的接口。
原型
get_history_trade_detail_data(accountID,strAccountType,strDatatype,strStratDate,strEndDate)
释义
get_history_trade_detail_data 是 QMT 内置 Python 中用于查询历史交易明细的接口。
研究:官方目录未明确;回测:官方目录未明确;模拟:官方目录未明确;实盘:官方目录未明确。
参数
| 参数 | 是否必填 | 官方原始定义 |
|---|---|---|
accountID |
是 | accountID |
strAccountType |
是 | strAccountType |
strDatatype |
是 | strDatatype |
strStratDate |
是 | strStratDate |
strEndDate |
是 | strEndDate |
返回值
以实际接口返回和下方详细说明为准。
示例
def handlebar(ContextInfo):
obj_list = get_history_trade_detail_data('6000000248','stock','position','20240513','20240514')
for time,data in obj_list:
for obj in data:
print(obj.m_strInstrumentID)
print(dir(obj))#查看有哪些属性字段
详细说明
用法: get_history_trade_detail_data(accountID,strAccountType,strDatatype,strStratDate,strEndDate);
释义: 获取历史成交明细数据,返回结果为一个([timetag,obj...])的元组
参数详细说明
accountID:string,账号; strAccountType:string,账号类型,有"FUTURE","STOCK","CREDIT","HUGANGTONG","SHENGANGTONG","STOCK_OPTION"; strDatatype:string,交易明细数据类型,有:持仓"POSITION"、委托"ORDER"、成交"DEAL"; strStratDate:string,开始时间,如'20240513'; strEndDate:string,结束时间,如'20240514';
**返回:**list,list中放的是PythonObj,通过dir(pythonobj)可返回某个对象的属性列表 示例: