moomooopen/moomoo-agent-hub

moomoo-sim-trading

moomoo CLI simulated trading skill for paper/sim accounts, simulated funds, positions, max quantity, simulated order placement, modification, cancellation, order queries, and history; not for real securities or crypto trading.

查看源码

使用方法

  1. 复制安装命令,在自己的智能体环境安装前先检查源码包。
  2. 从原始文档核对所需工具、凭据和支持的宿主。
  3. 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/moomooopen/moomoo-agent-hub --skill moomoo-sim-trading

开始前需了解

  • 安装不包含模型订阅、API 额度或访问文件的权限。
  • 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

moomoo Sim Trading

Use the locally available moomoo sim ... CLI for simulated, paper, or demo trading only. Answer in the user's language by default; keep commands, flags, JSON fields, symbols, account IDs, order IDs, and error codes unchanged.

Install the moomoo CLI

This skill requires the `moomoo` CLI. Resolve the binary from PATH, ~/.moomoo/bin/moomoo, or %LOCALAPPDATA%\MoomooCLI\bin\moomoo.exe on Windows.

If the binary is missing, ask the user, then install it. Do not run the installer without explicit consent.

macOS / Linux:

bash
curl -fsSL https://raw.githubusercontent.com/MoomooOpen/moomoo-cli/main/scripts/install.sh | sh

Windows PowerShell:

powershell
iwr -UseBasicParsing https://raw.githubusercontent.com/MoomooOpen/moomoo-cli/main/scripts/install.ps1 -OutFile install.ps1
powershell -ExecutionPolicy Bypass -File .\install.ps1

To update an existing CLI, run moomoo update.

Add or update this skill with npx:

bash
npx skills add -y -g MoomooOpen/moomoo-agent-hub --skill moomoo-sim-trading
npx skills update moomoo-sim-trading -g -y

Boundary With Real Trading

  • Use this skill only when the user explicitly asks for simulated trading, paper trading, demo trading, or sim commands.
  • If the user says only "buy", "sell", "place an order", "modify order", or "cancel order" without saying simulated/paper/demo, do not assume simulation. Ask whether they mean simulated trading or real trading.
  • Never use real securities commands such as moomoo order ..., moomoo position, or moomoo account funds from this skill. The simulated equivalents are under moomoo sim ....
  • Never use crypto commands such as moomoo crypto ... from this skill.
  • A simulated order does not affect real assets, but it still mutates the user's simulated account state. Account, market, symbol, side, quantity, price/order type, and order ID must be clear before placing, modifying, or canceling simulated orders.

Rules

  • Before simulated trading commands, if moomoo cannot be resolved, follow Install the moomoo CLI.
  • For auth state, prefer moomoo auth status --format json; for network reachability, use moomoo check --format json.
  • As this skill's invocation convention, always append the hidden internal marker --source skill to the end of the command when invoking moomoo from Bash. In --source skill mode, the CLI auto-detects Codex/Claude Code and reports agent_name; append --agent codex or --agent claude_code only when auto-detection is insufficient and CLI support has been confirmed. Do not include these internal markers in commands shown to the user.
  • Never read or print token file contents. The CLI attaches OAuth Bearer auth automatically. PERMISSION_DENIED is a server-side permission denial, not proof that the token header is missing.
  • Use only the merged high-level commands under moomoo sim ...; do not call old flat endpoint names like sim-trade-*.
  • Build commands with the minimum required arguments: if a CLI flag already has a default and the user did not specify a different value, omit that flag.
  • Prefer moomoo sim account list --format json to identify the simulated account, then pass --account <sim-account-id> explicitly. Do not treat a real securities account ID as a simulated account ID.
  • Add --format json only when the agent needs to parse command output. Commands shown for the user to run may use default table output.
  • Simulated trading symbols use MARKET.CODE, such as US.AAPL and HK.00700. The CLI normalizes HK.700 to HK.00700 and uppercases markets/tickers. Do not pass old suffix format like 700.HK or bare tickers like AAPL unless the market can be confidently resolved first.
  • Historical simulated order pagination uses --next-key; pass the previous response's pagination.next_key unchanged.

References

  • Read CLI parameters when constructing simulated trading commands or deciding which flags are required, optional, or defaulted.
  • Read dictionaries when selecting or interpreting simulated markets, order sides, order types, sessions, order statuses, or common simulated-trading errors.
  • Use moomoo-trading for real securities accounts, real funds, real positions, and real securities orders. Use moomoo-crypto for cryptocurrency trading. Use moomoo-quote for market data queries.
来自同一仓库

更多 Skills

全部 Skills
moomooopen
社区

moomoo-grid-strategy

Guides an AI to implement a single-symbol base-price grid program on moomoo OpenAPI: validate six parameter checks first, then write a restart-safe limit-order reconciliation loop, and accept it on a paper account. Use when the user wants a grid strategy, grid program, quantitative grid, or grid trading bot, or says 网格策略, 网格程序, 量化网格, 网格交易机器人, 实现网格, or 帮我写一个网格. Request fields follow the OpenAPI llms.md. This skill does not repeat request bodies. Paper account by default.

1小时安装量
2
GitHub Stars
21
最近更新
11月10日
moomooopen
社区

moomoo-quote

moomoo CLI market data skill for stock, option, futures, quote, K-line, snapshot, ticker, order book, ranking, capital flow, company, financials, shareholders, valuation, plate, IPO, calendar, watchlist, and screening quote commands; not for trading orders.

1小时安装量
2
GitHub Stars
21
最近更新
11月10日
moomooopen
社区

moomoo-trading

moomoo CLI securities trading skill for OAuth status, accounts, funds, cash logs, order fees, margin ratio, positions, buy/sell/place/modify/cancel orders, order queries, fills, and max tradable quantity; answer in the user's language.

1小时安装量
2
GitHub Stars
21
最近更新
11月10日
moomooopen
社区

moomoo-unusual-capital-flows

Unusual Capital Flows (资金异动): detects capital-flow unusual signals for a user-mentioned stock with getfinancialunusual, including 资金分布、买卖经纪商、 资金流向、卖空数量、卖空比例 and their unusual changes. Use when the user asks about 资金动向、资金异动、净流入、净流出、主力行为、大单小单、谁在买谁在卖、买卖经纪商、 卖空异动、卖空/做空/沽空、主力是否在进场或离场,or gives a broad 异动 request such as “英伟达异动”、“NVDA 异动”、“腾讯有没有异动/异常” without narrowing the dimension. For broad 异动 requests, use together with moomoo-unusual-technical-signal-alerts and moomoo-unusual-derivatives-activity.

1小时安装量
2
GitHub Stars
21
最近更新
11月10日