qmt-bridge-trading

qmt-bridge-trading is a skill for Claude Code, Codex from atorber/qmt-trading-skill. It costs 111 tokens per session (3,113 once invoked), scanned A, original, MIT.

A bridge to QMT, a Chinese securities-trading system, through an HTTP API, a way for software to send requests over the web. It connects to miniQMT accounts running on Windows.

In plain words
What is it for?
Use it to check balances and holdings, place single or batch orders, cancel orders, or plan and execute a full liquidation of a portfolio.
Why use it?
It provides a defined way to inspect an account and prepare or execute trading actions, while requiring checks and confirmation before real orders.

Skill for Claude CodeCodex

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is **发布位置**:`qmt-trading-skill` 仓库 `skills/qmt-bridge-trading/SKILL.md`。集成说明见 [`skills/README.md`](../README.md)、[路线图](../ROADMAP.md) 与文档 [agent-skills.md](../../d.

Good fit Use it to check balances and holdings, place single or batch orders, cancel orders, or plan and execute a full liquidation of a portfolio.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/atorber/qmt-trading-skill
agentmods
npx agentmods add skills/atorber/qmt-trading-skill/qmt-bridge-trading

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 qmt-bridge-trading

README.md
[![agentmods](https://agentmods.dev/badge/skills/atorber/qmt-trading-skill/qmt-bridge-trading/github.svg)](https://agentmods.dev/skills/atorber/qmt-trading-skill/qmt-bridge-trading)
Your own site
<a href="https://agentmods.dev/skills/atorber/qmt-trading-skill/qmt-bridge-trading"><img src="https://agentmods.dev/badge/skills/atorber/qmt-trading-skill/qmt-bridge-trading/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 qmt-bridge-trading

Your own site · 80×15
<a href="https://agentmods.dev/skills/atorber/qmt-trading-skill/qmt-bridge-trading"><img src="https://agentmods.dev/badge/skills/atorber/qmt-trading-skill/qmt-bridge-trading.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 111 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,113 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Agent Snooping · line 6
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Agent Snooping · line 11
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium Data Exfiltration · line 127
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
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.00111 $0.03113
Opus 5 $0.00056 $0.01556
Sonnet 5 $0.00022 $0.00623
Haiku 4.5 $0.00011 $0.00311

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

Security

Grade A, and why

qmt-bridge-trading scanned grade A with 1 finding 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 11d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/_common.py, scripts/liquidate.py, scripts/place_order.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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

在仓库根目录执行(需 `pip install -e .`,环境变量见 `.env`)。**优先调用脚本**,避免在对话中手写长 curl/Python;脚本只输出摘要,不 dump 全量 JSON。
skills/qmt-bridge-trading/SKILL.md · 256 lines

How it starts

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

QMT Trading Skill · 交易

发布位置qmt-trading-skill 仓库 skills/qmt-bridge-trading/SKILL.md。集成说明见 skills/README.md路线图 与文档 agent-skills.md。相关 Skill:复盘 execution-review、风控 portfolio-risk、撤单 order-ops

通过已部署的 QMT Bridge 服务(FastAPI + miniQMT)完成真实交易操作。服务端须在 Windows 上运行,并启用交易模块。

可执行脚本(优先使用)

在仓库根目录执行(需 pip install -e .,环境变量见 .env)。优先调用脚本,避免在对话中手写长 curl/Python;脚本只输出摘要,不 dump 全量 JSON。

脚本 作用 示例
scripts/trading_status.py 只读:health + 账户状态 + 持仓/资产摘要 python skills/qmt-bridge-trading/scripts/trading_status.py
scripts/place_order.py 单笔下单(默认预览) .../place_order.py 000001.SZ --buy --volume 100 --execute --confirm
scripts/liquidate.py 清仓计划/执行(默认预览) .../liquidate.py → 确认后 .../liquidate.py --execute --confirm

路径均相对于本 skill 目录:skills/qmt-bridge-trading/scripts/

实盘提交须同时带 --execute --confirmplace_order / liquidate)。交易前先跑 trading_status.py

前置检查(每次交易前)

  1. 服务可用GET /api/meta/health(无需 Key)
  2. 交易已启用:启动参数含 --tradingQMT_BRIDGE_TRADING_ENABLED=true
  3. 认证:所有 /api/trading/* 请求头携带 X-API-Key: <密钥>(与服务端 QMT_BRIDGE_API_KEY 一致)
  4. 账户:多账户时传 account_id;留空则使用服务端默认户(QMT_BRIDGE_DEFAULT_ACCOUNT 指定 stock/credit)
  5. 连接:下单前建议 GET /api/trading/account_status,确认交易通道已连接

连接信息

从用户环境或项目 .env 读取(勿在对话中复述完整 API Key):

变量 含义
QMT_BRIDGE_HOST / 用户提供的 IP 服务端地址
QMT_BRIDGE_PORT 端口,默认 8000
QMT_BRIDGE_API_KEY 交易认证密钥
QMT_BRIDGE_STOCK_ACCOUNT_ID 普通证券账户(可选)
QMT_BRIDGE_CREDIT_ACCOUNT_ID 信用两融账户(可选)
QMT_BRIDGE_DEFAULT_ACCOUNT 默认户 stock / credit(默认 stock)

Python 客户端(推荐,仓库已内置):

from qmt_bridge import QMTClient

client = QMTClient(host="192.168.1.100", port=8000, api_key="***")

curl:所有交易请求加 -H "X-API-Key: $QMT_BRIDGE_API_KEY"

Read the full file on GitHub · 256 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 256 lines · 111 tokens per session scan A 3dcf33e00af1

Subscribe to this mod's changes

qmt-bridge-trading is a skill published in the GitHub repository atorber/qmt-trading-skill (22 stars, last pushed 28d ago), licensed MIT. It adds 111 tokens to every session and 3,113 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

sector-rotation

An analysis framework for comparing industries in the Chinese A-share stock market, using business conditions, price momentum, valuation, and money flows. It produces rankings and higher- or lower-allocation suggestions.

HKUDS/Vibe-Trading · 39 tokens

strategy-pivot-designer

Detect backtest iteration stagnation and generate structurally different strategy pivot proposals when parameter tuning reaches a local optimum.

tradermonty/claude-trading-skills · 28 tokens

twitter-reader

Read Twitter/X for financial research using opencli (read-only). Use this skill whenever the user wants to read their Twitter feed, search for financial tweets, view bookmarks, look up user profiles, or gather market sentiment from Twitter/X. Triggers include: "check my feed", "search Twitter for", "show my…

himself65/finance-skills · 161 tokens

chenhao-limit-up

A framework for judging Chinese A-share stocks that have reached the daily price-rise limit, using market mood, sector leadership, and trading momentum.

questflowai/investorskills · 44 tokens

trading-risk-gate

Unified pre-trade safety gate: Ruin check (Law #1), ergodicity audit, and win-rate dominance validation. Absorbs: ergodicity-check, law-of-ruin, win-rate-dominance.

winstonkoh87/Athena-Public · 53 tokens

furusato

A Japanese hometown-tax donation manager for furusato nozei, a system where donations to municipalities can qualify for an income-tax or local-tax deduction. It reads donation receipts, stores donation records, and calculates deduction limits.

kazukinagata/shinkoku · 102 tokens