qmt-bridge-credit-margin

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

A QMT Bridge tool for checking and using a margin account, where trades can borrow money or securities. It reads collateral, available margin, debts, and credit-account positions, and can place selected credit trades.

In plain words
What is it for?
Checking margin assets, liabilities, collateral, and available buying power; reviewing credit positions; and placing financing buys, short sales, buy-to-cover orders, or sell-to-repay orders through QMT.
Why use it?
It keeps margin-account work separate from ordinary stock trading, reducing the risk of using the wrong account or trade type. Orders are shown as previews unless explicitly confirmed for live execution.

Skill for Claude CodeCodex

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

Good fit Checking margin assets, liabilities, collateral, and available buying power; reviewing credit positions; and placing financing buys, short sales, buy-to-cover orders, or sell-to-repay orders through QMT.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/atorber/qmt-trading-skill/qmt-bridge-credit-margin
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 atorber/qmt-trading-skill --skill qmt-bridge-credit-margin
Clone the repo
git clone --depth 1 https://github.com/atorber/qmt-trading-skill

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-credit-margin

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/atorber/qmt-trading-skill/qmt-bridge-credit-margin"><img src="https://agentmods.dev/badge/skills/atorber/qmt-trading-skill/qmt-bridge-credit-margin.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 954 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.00061 $0.00954
Opus 5 $0.00030 $0.00477
Sonnet 5 $0.00012 $0.00191
Haiku 4.5 $0.00006 $0.00095

Measured 11d ago against content hash 9927515a06c7, 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-credit-margin 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 11d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/credit_order.py, scripts/credit_snapshot.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.

skills/qmt-bridge-credit-margin/SKILL.md · 84 lines

How it starts

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

QMT Trading Skill · 两融信用

实现状态:✅ credit_snapshot.pycredit_order.py 可用(需两融账户)

目标

信用账户专用查询与规程,与现货 trading skill 隔离,避免误操作。

脚本

脚本 作用
scripts/credit_snapshot.py 信用资产/负债摘要;持仓按「总=融资+担保品」拆分(对齐 QMT 内置 get_unclosed_compacts + position
scripts/credit_order.py 信用下单:融资买入 / 融券卖出 / 买券还券 / 卖券还款;默认预览,--execute --confirm 才实盘

主要 API

前缀 说明
/api/credit/* 融资融券相关(见 REST API
/api/trading/* 部分信用下单可能共用,须区分账户类型

规程

  1. 确认服务端已开通信用、账户 ID 正确
  2. 只读快照优先
  3. 开仓/平仓类写操作:单独确认,不与其他 skill 混用

信用下单

# 预览(默认,不提交)
python skills/qmt-bridge-credit-margin/scripts/credit_order.py 000001.SZ --finance-buy --volume 100

# 实盘:限价融资买入(须用户明确确认后再加 --execute --confirm)
python skills/qmt-bridge-credit-margin/scripts/credit_order.py 000001.SZ \
  --finance-buy --volume 100 --limit 10.50 --execute --confirm

# 卖券还款
python skills/qmt-bridge-credit-margin/scripts/credit_order.py 000001.SZ --sell-repay --volume 100 --execute --confirm
参数 order_type 含义
--finance-buy 27 融资买入
--short-sell 28 融券卖出
--buy-repay 29 买券还券
--sell-repay 31 卖券还款

担保品普通买卖请用 trading skill 的 place_order.py/api/trading/order + 信用账户)。

安全

  • 杠杆风险;默认实盘
  • 无信用账户则跳过本 skill

信用持仓拆分

QMT 内置脚本逻辑(compact_type=48 为融资买入)在 Bridge 中等价为:

QMT 内置 Bridge / Skill
get_unclosed_compacts(account, 'CREDIT') query_stk_compacts/api/credit/debt
get_trade_detail_data(..., 'position') query_credit_positions/api/credit/positions
担保品 = 总持仓 − 融资量 /api/credit/positions/breakdowncredit_positions_util
python skills/qmt-bridge-credit-margin/scripts/credit_snapshot.py --port 8080 --api-key KEY
# JSON 含 breakdown: [{stock_code, total_volume, margin_volume, collateral_volume, ...}]

账户默认取 .envQMT_BRIDGE_CREDIT_ACCOUNT_ID(不受 QMT_BRIDGE_DEFAULT_ACCOUNT 影响);也可显式传 --account-id

Read the full file on GitHub · 84 lines

Files

What ships with it

3 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 · 84 lines · 61 tokens per session scan A 9927515a06c7

Subscribe to this mod's changes

qmt-bridge-credit-margin is a skill published in the GitHub repository atorber/qmt-trading-skill (22 stars, last pushed 27d ago), licensed MIT. It adds 61 tokens to every session and 954 once invoked, about $0.0003 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.

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