跳到正文
QMT

ContextInfo.get_hkt_details

获取指定品种的持股明细

原型

ContextInfo.get_hkt_details(stockcode)

释义

获取指定品种的持股明细

参数

参数名称 数据类型 描述
stockcode string 必须是'stock.market'形式

返回值

  • 根据stockcode返回一个dict,该字典的key值是北向持股明细数据的时间戳,其值仍然是一个dict,其值的key值是北向持股明细数据的字段类型,其值是对应字段的值,该字典数据key值有:
参数名称 数据类型/单位 描述
stockCode str 股票代码
ownSharesCompany str 机构名称
ownSharesAmount int 持股数量
ownSharesMarketValue float 持股市值
ownSharesRatio float 持股数量占比
ownSharesNetBuy float 净买入金额(当日持股-前一日持股)

示例

示例

# coding = gbk
def init(C):
    return
def handlebar(C):
    data = C.get_hkt_details('600000.SH')
    print(data)

返回值

{1696694400053: {"stockCode": "600000.SH", "ownSharesCompany": "香港中央结算有限公司",
"ownSharesAmount": 15, "ownSharesMarketValue": 106.50000000000001,
"ownSharesRatio": 0.0, "ownSharesNetBuy": 0.0}}

官方来源

QMT 官方文档:获取指定品种的持股明细。网页核对日期:2026-10-11。

本页目录