# Send OpenD CLI for MooMoo to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "opend",
    "name": "OpenD CLI for MooMoo",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/oscraters/opend",
    "canonicalUrl": "https://clawhub.ai/oscraters/opend",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/opend",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=opend",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "agents/openai.yaml",
      "credentials.py",
      "get_market_snapshot.py",
      "opend_cli.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/opend"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/opend",
    "downloadUrl": "https://openagent3.xyz/downloads/opend",
    "agentUrl": "https://openagent3.xyz/skills/opend/agent",
    "manifestUrl": "https://openagent3.xyz/skills/opend/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/opend/agent.md"
  }
}
```
## Documentation

### OpenD Skill

Use this skill to execute local OpenD operations through a single CLI surface.

### Quick Start

Ensure OpenD is running on 127.0.0.1:11111, or override with OPEND_HOST and OPEND_PORT.
Install one provider SDK: moomoo or futu.
Prefer OpenClaw-managed secret refs for hosted use:

export OPEND_PASSWORD_SECRET_REF='{"source":"env","id":"MOOMOO_PASSWORD"}'
Provide the actual MOOMOO_PASSWORD through OpenClaw gateway secret injection, not plain shell export.


Optional local-only helpers: pip install keyring cryptography.

### Primary Interface

Use Bash CLI ./openclaw for routine operations. If the wrapper is unavailable in a published bundle, use python3 opend_cli.py directly and treat that as a packaging bug.

Examples:

Snapshot:

./openclaw snapshot --codes HK.00700,US.AAPL


Accounts:

./openclaw accounts


Positions:

./openclaw --trd-env SIMULATE positions


Place simulated order:

./openclaw --market HK --trd-env SIMULATE place-order --code HK.00700 --price 100 --qty 100 --side BUY


Cancel order:

./openclaw --market HK --trd-env SIMULATE cancel-order --order-id <ORDER_ID>

### Credential Methods

Default: openclaw

Reads OPEND_PASSWORD_SECRET_REF first.
Current local resolver accepts OpenClaw-style env refs only: {"source":"env","id":"ENV_VAR_NAME"}.
file and exec refs must be resolved by the OpenClaw gateway before launching this skill.


Legacy compatibility:

env: reads MOOMOO_PASSWORD
config: reads MOOMOO_CONFIG_KEY and decrypts config.enc
keyring: prompts once and stores password in the OS keyring


Deliberate warning:

env, config, and keyring bypass the preferred OpenClaw secret-ref audit path. Use them only for local development or controlled offline workflows.

### Agentic Defaults

Prefer --output json so downstream steps can parse results.
Prefer SIMULATE unless the user explicitly requests live trading.
Query accounts first for unknown environments, then pass explicit --acc-id.
For live trading, unlock is required. Simulated accounts skip unlock automatically.

### Safety and Secret Handling

This repository is an open-source wrapper around a commercial trading API provider. Users are expected to inspect and modify it as needed.
Hosted or shared deployments should use OpenClaw secret management, not raw shell environment variables.
setup_config.py and config.enc are legacy compatibility helpers. They no longer print reusable keys to stdout, but they still create local secret material and should be treated as sensitive.
keyring stores credentials in the OS keychain. Confirm that storage model is acceptable before using it.
OPEND_SDK_PATH changes where Python imports moomoo or futu from. Only point it at trusted code.

### Environment and Runtime Inputs

Secrets:

OPEND_PASSWORD_SECRET_REF
MOOMOO_PASSWORD
MOOMOO_CONFIG_KEY

Non-secret overrides:

OPEND_HOST
OPEND_PORT
OPEND_MARKET
OPEND_SECURITY_FIRM
OPEND_TRD_ENV
OPEND_CREDENTIAL_METHOD
OPEND_OUTPUT
OPEND_SDK_PATH

### Files

openclaw: Bash CLI entrypoint.
opend_cli.py: structured command interface.
opend_core.py: shared OpenD logic.
credentials.py: secret-ref, env, keyring, and config password loading.
references/api_docs.md: official API links and key limits.
references/release_checklist.md: pre-publish validation checklist.

### Legacy Compatibility

Older scripts delegate to opend_cli.py:

get_market_snapshot.py
query_positions.py
place_order.py
place_order_env.py
place_order_keyring.py
place_order_config.py
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: oscraters
- Version: 1.0.1
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-04-30T16:55:25.780Z
- Expires at: 2026-05-07T16:55:25.780Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/opend)
- [Send to Agent page](https://openagent3.xyz/skills/opend/agent)
- [JSON manifest](https://openagent3.xyz/skills/opend/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/opend/agent.md)
- [Download page](https://openagent3.xyz/downloads/opend)