跳到正文
QMT
QMT · 内置 Python变量约定与数据结构

PositionStatistics

持仓统计对象

字段名 数据类型 描述
m_strAccountID string 账号
m_strExchangeID string 市场代码
m_strExchangeName string 市场名称
m_strProductID string 品种代码
m_strInstrumentID string 合约代码
m_strInstrumentName string 合约名称
m_nDirection int 多空
m_nHedgeFlag int 投保
m_nPosition int 持仓
m_nYestodayPosition int 昨仓
m_nTodayPosition int 今仓
m_nCanCloseVol int 可平
m_dPositionCost float 持仓成本
m_dAvgPrice float 持仓均价
m_dPositionProfit float 持仓盈亏
m_dFloatProfit float 浮动盈亏
m_dOpenPrice float 开仓均价
m_dUsedMargin float 已使用保证金
m_dUsedCommission float 已使用的手续费
m_dFrozenMargin float 冻结保证金
m_dFrozenCommission float 冻结手续费
m_dInstrumentValue float 市值,合约价值
m_nOpenTimes int 开仓次数
m_nOpenVolume int 总开仓量 中间平仓不减
m_nCancelTimes int 撤单次数
m_dLastPrice float 最新价
m_dRiseRatio float 当日涨幅
m_strProductName string 产品名称
m_dRoyalty float 权利金市值
m_strExpireDate string 到期日
m_dAssestWeight float 资产占比
m_dIncreaseBySettlement float 当日涨幅(结)
m_dMarginRatio float 保证金占比
m_dFloatProfitDivideByUsedMargin float 浮盈比例(保证金)
m_dFloatProfitDivideByBalance float 浮盈比例(动态权益)
m_dTodayProfitLoss float 当日盈亏(结)
m_nYestodayInitPosition int 昨日持仓
m_dFrozenRoyalty float 冻结权利金
m_dTodayCloseProfitLoss float 当日盈亏(收)
m_dCloseProfit float 平仓盈亏
m_strFtProductName string 品种名称
m_dOpenCost float 开仓成本

官方来源

QMT 官方文档:持仓统计对象。网页核对日期:2026-10-11。

本页目录