mcpField
M
moomoo-sim-trading

moomoo-sim-trading

github.com/moomooopenOther2163 installsUpdated 2d ago
Repository

About moomoo-sim-trading

moomoo-sim-trading is a skill for agents using the moomoo CLI for simulated, paper, or demo securities trading only. It keeps simulated commands separate from real trading and requires clear order details before simulated account changes.

Key features

  1. 01Run simulated commands under moomoo sim
  2. 02Identify simulated accounts explicitly
  3. 03Normalize market-prefixed symbols
  4. 04Keep simulated and real trading separate
  5. 05Require clear details before order changes

Use cases

  1. 01Review simulated accounts and orders
  2. 02Place or modify paper-trading orders
  3. 03Practice trades without affecting real assets

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/moomooopen/moomoo-agent-hub --skill moomoo-sim-trading

After installing, type/moomoo-sim-tradingin Claude Code to confirm it loaded.

Bundled filesreferences/cli-parameters.mdreferences/dictionaries.md

Details

From the project README

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:

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

Windows 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:

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.

Comments

Markdown supported