qmt量化交易策略小白学习笔记第19期【qmt编程之获取沪深港通持股数据--内置python】

qmt编程之获取沪深港通持股数据

qmt更加详细的教程方法,会持续慢慢梳理。

也可找寻博主的历史文章,搜索关键词查看解决方案 !

沪深港通持股数据

提示:
  1. 该数据是VIP权限数据
  2. vip权限数据

获取指定品种的持股明细

内置python

复制代码
C.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}}
相关推荐
花酒锄作田14 小时前
使用 pkgutil 实现动态插件系统
python
前端付豪18 小时前
LangChain链 写一篇完美推文?用SequencialChain链接不同的组件
人工智能·python·langchain
曲幽18 小时前
FastAPI实战:打造本地文生图接口,ollama+diffusers让AI绘画更听话
python·fastapi·web·cors·diffusers·lcm·ollama·dreamshaper8·txt2img
老赵全栈实战19 小时前
Pydantic配置管理最佳实践(一)
python
jiayou641 天前
KingbaseES 实战:深度解析数据库对象访问权限管理
数据库
阿尔的代码屋1 天前
[大模型实战 07] 基于 LlamaIndex ReAct 框架手搓全自动博客监控 Agent
人工智能·python
AI探索者2 天前
LangGraph StateGraph 实战:状态机聊天机器人构建指南
python
AI探索者2 天前
LangGraph 入门:构建带记忆功能的天气查询 Agent
python
FishCoderh2 天前
Python自动化办公实战:批量重命名文件,告别手动操作
python
躺平大鹅2 天前
Python函数入门详解(定义+调用+参数)
python