ContextInfo.get_hkt_details - 获取指定品种的持股明细

ContextInfo.get_hkt_details 是 QMT 内置 Python 中用于获取指定品种的持股明细的接口。

原型

ContextInfo.get_hkt_details(stockcode)

释义

ContextInfo.get_hkt_details 是 QMT 内置 Python 中用于获取指定品种的持股明细的接口。

研究:官方目录未明确;回测:官方目录未明确;模拟:官方目录未明确;实盘:官方目录未明确。

参数

参数 是否必填 官方原始定义
stockcode stockcode

返回值

根据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)

详细说明

功能说明

获取指定品种的持股明细

参数详细说明

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

返回值

根据stockcode返回一个dict,该字典的key值是北向持股明细数据的时间戳,其值仍然是一个dict,其值的key值是北向持股明细数据的字段类型,其值是对应字段的值,该字典数据key值有:

参数名称 数据类型/单位 描述
stockCode str 股票代码
ownSharesCompany str 机构名称
ownSharesAmount int 持股数量
ownSharesMarketValue float 持股市值
ownSharesRatio float 持股数量占比
ownSharesNetBuy float 净买入金额(当日持股-前一日持股)