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.
How do I install this agent skill?
npx skills add https://github.com/moomooopen/moomoo-agent-hub --skill moomoo-tradingIs this agent skill safe to install?
- Gen Agent Trust Hubfail
The skill provides a comprehensive interface for securities trading using the moomoo CLI. It includes instructions for installing the CLI through remote shell scripts provided by the vendor. While these methods involve remote code execution and execution policy bypasses, they are intended for initial setup, originate from the developer's official repository, and require explicit user consent. The skill also exhibits a potential surface for indirect prompt injection via command construction from user input, though it includes guidelines for parameter normalization.
- Socketpass
No alerts
- Snykwarn
Risk: MEDIUM · 1 issue
What does this agent skill do?
moomoo Trading
Use the locally available moomoo CLI for securities trading. Answer in the user's language by default; keep commands, flags, JSON fields, error codes, and symbols 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-trading
npx skills update moomoo-trading -g -y
Rules
- Before account or trading commands, if
moomoocannot be resolved, follow Install the moomoo CLI. - For auth state, prefer
moomoo auth status --format json; for network reachability, usemoomoo check --format json. - As this skill's invocation convention, always append the hidden internal marker
--source skillto the end of the command when invokingmoomoofrom Bash. In--source skillmode, the CLI auto-detects Codex/Claude Code and reportsagent_name; append--agent codexor--agent claude_codeonly 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_DENIEDis a server-side permission denial, not proof that the token header is missing. - 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.
- Do not assume a default account exists. Omit
--accountonly after this session has confirmed a configured default account viamoomoo auth statusor config; otherwise list accounts or ask the user to choose one, then pass--accountexplicitly. - Add
--format jsononly when the agent needs to parse command output. Commands shown for the user to run may use default table output. - Securities symbol arguments are
symbolvalues inMARKET.CODEformat, such asUS.AAPLandHK.00700.HK.700is normalized toHK.00700, and lowercase markets/tickers are uppercased. Do not pass old suffix format like700.HKor bare tickers likeAAPL. - Historical
--start/--endfilters are microsecond Unix timestamps. Table time columns are displayed in UTC+8; JSON output keeps raw API fields. - Order and fill list commands auto-page internally. The user-facing CLI only exposes
--page-size, not--page-flag, for securities order/fill lists. account cash-logsreturns one page per call. Use--format json, then pass--page-flagfrom the prior response untilcompletedis true.order feesrequires a concreteorder_id. FX order fees are not supported by the Open API yet.margin-ratiorequires--security-firmand--codes(max 10 symbols). Prefersecurity_firmfromaccount list --format json.- Real account mutations require explicit user confirmation first:
order buy,order sell,order place,order modify, andorder cancel. - Do not invent broker confirmation. If the CLI reports broker confirmation because the API returned
need_order_confirm=true/confirm_id, relay the prompt and wait for explicit approval before sendingy.
References
- Read CLI parameters when constructing commands or deciding which flags are required, optional, or defaulted.
- Read dictionaries when selecting or interpreting market, side, order type, status, or account-market values.
- Use
moomoo-cryptofor cryptocurrency exchange trading.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/moomooopen/moomoo-agent-hub/moomoo-trading">View moomoo-trading on skillZs</a>