qmt-xtquant SKILL.md skillA
qmt-xtquant from yangsal/ashares_data_collect is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add yangsal/ashares_data_collect/qmt-xtquant@git:20260625.6a59792Pins git:20260625.6a59792 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- yangsal/ashares_data_collect
- Path
skills/qmt-xtquant/SKILL.md- Versions recorded
- 1
- Latest version
- git:20260625.6a59792, committed Jun 25, 2026
- Size
- 6,380 bytes
- Repository stars
- 39
- License
- MIT
QMT/MiniQMT xtquant 原生 API 知识库,用于编写、调试或扩展调用 `xtquant.xtdata` 的 A 股数据采集任务。 适用场景:下载/读取 K线、tick、财务、合约信息、板块分类、指数权重、除权因子数据;股票代码与 UTC 毫秒时间戳转换;MiniQMT 连接失败排障(返回 -1、端口冲突、session、权限)。覆盖 xtdata 的 download_*→get_* 核心范式、全部函数签名、各类数据字段 schema,以及关键坑(get_market_data 与 get_market_data_ex 返回结构不同、单股订阅 ≤50、tick 时间戳为 UTC 毫秒需 +8h、静态信息无需频繁下载)。 当处理 xtquant / xtdata / MiniQMT / QMT 相关的行情数据接口、字段含义或下载逻辑时使用; 亦含 xttrader 交易模块(报单/撤单/查询/回调)与分品种数据字典(stock/index/future)参考。.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# QMT xtquant 数据采集知识库
`xtquant` 是迅投 MiniQMT 衍生的 Python 量化库。`xtdata` 模块提供行情(历史/实时 K 线和分笔)、
财务、合约基础信息、板块/行业分类、指数权重等数据。本知识库以**数据采集**为主;交易模块 `xttrader` 另有精简参考备查。
官方文档:https://dict.thinktrader.net/nativeApi/start_now.html
## 运行模型(必读)
- **xtdata 不直连行情服务器**,而是连接本地运行的 **MiniQMT 客户端**,由 MiniQMT 处理数据请求再回传到
Python 层。因此**运行任何脚本前,MiniQMT 必须已启动并登录**(登录时需勾选"极简模式")。
- xtquant 大部分历史数据以**压缩格式存储在本地**。获取接口(`get_*`)只读本地缓存,本地数据不足时
必须先用下载接口(`download_*`)补充,否则取不到。
- 仅 Windows 平台可用(本项目所有 xtquant 任务都标了 `platform: windows`)。
## 核心范式:先 download_ 再 get_
接口前缀语义:`download_` 下载到本地 / `get_` 读本地 / `subscribe_`、`unsubscribe_` 订阅实时。
```python
from xtquant import xtdata
# 1) 下载(同步阻塞,下载完才返回;下载接口本身不返回数据)
xtdata.download_history_data2(stock_list, period="1d",
start_time="20240101", end_time="20240131")
# 2) 读取(从本地缓存)
data = xtdata.get_market_data_ex([], stock_list, period="1d",
start_time="20240101", end_time="20240131",
count=-1, dividend_type="none", fill_data=False)
```
- 历史部分用 `download_history_data2` 补;实时部分用 `subscribe_quote` 订阅,之后 `get_*` 会自动拼接
本地历史 + 服务器实时。
…Read the whole file at its exact version.
How to install
mdr add yangsal/ashares_data_collect/qmt-xtquant@sha256:6e133172ed6923a8The line at the top of this page pins the label git:20260625.6a59792, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_hkxlyd4uul3s65kg)
2 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Jun 25, 2026.
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (6380 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
yangsal/ashares_data_collect · 39 stars · license MIT · pushed 2026-10-14 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_hkxlyd4uul3s65kg GET https://markdownregistry.com/api/v1/resolve?ref=yangsal/ashares_data_collect/qmt-xtquant GET https://markdownregistry.com/api/v1/blob/6e133172ed6923a89f090704eb081552847301ae691c6cc849a6f5018638619a
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.