miniqmt-to-bigqmt

miniqmt-to-bigqmt is a skill for Claude Code, Codex from litaolemo/xtquant_big_convert. It costs 144 tokens per session (3,207 once invoked), scanned A, original, MIT.

A conversion guide for moving Python trading strategies from miniQMT, an external trading setup, into the Python environment built into bigQMT, a trading client. It covers code changes, compatibility checks, deployment, and live-trading verification.

In plain words
What is it for?
Use it to assess and rewrite miniQMT strategies, map xtquant calls to bigQMT calls, check Python 3.6 and GBK compatibility, track orders, and prepare a strategy for deployment and live testing.
Why use it?
The two QMT environments use different program entry points, market-data and order APIs, account handling, Python versions, and text encodings. This helps identify what can be moved safely and what needs an alternative design.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to assess and rewrite miniQMT strategies, map xtquant calls to bigQMT calls, check Python 3.6 and GBK compatibility, track orders, and prepare a strategy for deployment and live testing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/litaolemo/xtquant_big_convert/miniqmt_2_bigqmt-skill
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add litaolemo/xtquant_big_convert --skill miniqmt_2_bigqmt-skill
Clone the repo
git clone --depth 1 https://github.com/litaolemo/xtquant_big_convert

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for miniqmt-to-bigqmt

README.md
[![agentmods](https://agentmods.dev/badge/skills/litaolemo/xtquant_big_convert/miniqmt_2_bigqmt-skill/github.svg)](https://agentmods.dev/skills/litaolemo/xtquant_big_convert/miniqmt_2_bigqmt-skill)
Your own site
<a href="https://agentmods.dev/skills/litaolemo/xtquant_big_convert/miniqmt_2_bigqmt-skill"><img src="https://agentmods.dev/badge/skills/litaolemo/xtquant_big_convert/miniqmt_2_bigqmt-skill/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for miniqmt-to-bigqmt

Your own site · 80×15
<a href="https://agentmods.dev/skills/litaolemo/xtquant_big_convert/miniqmt_2_bigqmt-skill"><img src="https://agentmods.dev/badge/skills/litaolemo/xtquant_big_convert/miniqmt_2_bigqmt-skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 144 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,207 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00144 $0.03207
Opus 5 $0.00072 $0.01604
Sonnet 5 $0.00029 $0.00641
Haiku 4.5 $0.00014 $0.00321

Measured 10d ago against content hash 9d95812d22d0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

miniqmt-to-bigqmt scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

The scan reads SKILL.md. This mod also ships 5 executable files (scripts/analyze_strategy.py, scripts/check_converted.py, scripts/to_gbk.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/MiniQMT_2_BigQMT-Skill/SKILL.md · 142 lines

How it starts

The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MiniQMT 策略 → 大QMT内置Python 转换

把外部 xtquant 策略(自带 Python 进程 + XtQuantTrader/xtdata)改写为在大QMT客户端内运行的内置策略(init/handlebar/run_time + passorder)。目标是"真正能实盘",不是语法翻译——两套体系的运行模型、账户绑定、下单返回值、数据时效都不同,必须按本流程逐项处理。

两套体系的本质差异(先建立心智模型)

维度 miniQMT 外接 大QMT 内置
进程 自己的 Python 进程,pip 任装 客户端内嵌 Python 3.6,库受限(券商可能有白名单)
编码 UTF-8 GBK(首行必须 #coding:gbk
入口 if __name__ == '__main__' 自由编排 框架回调:init(C)after_init(C)handlebar(C)/定时器
线程 随意多线程/apscheduler 所有策略共用一个线程,禁止阻塞(sleep/死循环/锁会卡死全部策略)
账户 代码里 StockAccount(id, type),可多账户 界面选定,注入全局变量 account/accountType,一个策略实例绑一个账户
下单 order_stock_async 返回 seq,回报回调对账 passorder 无返回值,靠 userOrderId(投资备注,对应 m_strRemark)追踪
查询 query_stock_asset/orders/positions 返回无前缀字段对象 get_trade_detail_data 返回 m_ 前缀字段对象(m_nVolume 等)
行情 xtdata.*(连 miniQMT 行情进程) C.get_full_tick/C.get_market_data_ex 等(客户端行情)
启停 自己守护、AutoLogin 重启 QMT 随客户端启停;客户端设置里配自动登录/策略自启

转换工作流

复制此清单跟踪进度:

- [ ] 第1步 静态分析与可行性评估
- [ ] 第2步 选择目标结构模板
- [ ] 第3步 逐 API 映射改写
- [ ] 第4步 处理订单追踪与状态机
- [ ] 第5步 py3.6/GBK 合规校验
- [ ] 第6步 输出转换报告
- [ ] 第7步 部署与实盘验证指引

第1步 静态分析与可行性评估

用户若对内置端能力存疑(外部数据还能不能取、运行频率是否受限、能否回测、多策略会不会互相拖累等),先用 faq.md 对齐认知再开工——这些多为误解,不要让错误前提影响转换方案。

运行分析脚本,得到 API 清单、py3.6 语法违例、第三方依赖、阻塞模式等:

python scripts/analyze_strategy.py <原策略.py>

按报告对照 constraints.md 分类每个发现项:

  • 可直接映射 → 第3步处理
  • 需重构(apscheduler/多线程/while-sleep 主循环、回报回调对账等)→ 按模板重组
  • 不可转换(多账户单进程、重型第三方库、7x24 外部守护等)→ 在转换报告中给出 constraints.md 对应的替代方案(文件桥/外接极简模式/拆分策略),不要硬转

任何一项"不可转换"都不代表整个策略失败——逐项给方案,能转的部分照常转。

第2步 选择目标结构模板

原策略形态 模板
定时轮询型:apscheduler / while+sleep / 定点任务(绝大多数 miniQMT 策略) templates/template_timer.py
行情驱动型:xtdata.subscribe_quote 回调驱动 / 单标的 K线信号 templates/template_bar.py

模板已含:GBK 头、全局状态类 G禁止把可变状态存 ContextInfo,有逐K线回滚机制)、C.set_account(account)(启用交易回调)、定时器注册、委托状态字典对账骨架、收盘自动停止逻辑。在模板骨架上填充策略逻辑,不要从零写。

Read the full file on GitHub · 142 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 142 lines · 144 tokens per session scan A 9d95812d22d0

Subscribe to this mod's changes

miniqmt-to-bigqmt is a skill published in the GitHub repository litaolemo/xtquant_big_convert (558 stars, last pushed today), licensed MIT. It adds 144 tokens to every session and 3,207 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.