Skip to content
Back to skills

Opend

ASecurity

Agentic trading and market-data workflows for Futu OpenD (MooMoo/Futu OpenAPI), including OpenClaw-compatible secret-ref credential loading, account discovery, position queries, and simulated or live order placement. Use when tasks require calling local OpenD through Python/Bash automation with structured JSON output and explicit trading-safety guardrails.

  • 21 stars
  • 0 votes
  • 0 copies
  • 9 views
  • Added September 7, 2026
toolspythonrustshellbashrailsapisecurity

Works with

  • cli
  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 17 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add modbender/skill-library-mcp --skill opend --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Opend?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Opend
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-opend/badge)](https://www.skillsdirectory.com/skills/modbender-opend)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: opend
description: Agentic trading and market-data workflows for Futu OpenD (MooMoo/Futu OpenAPI), including OpenClaw-compatible secret-ref credential loading, account discovery, position queries, and simulated or live order placement. Use when tasks require calling local OpenD through Python/Bash automation with structured JSON output and explicit trading-safety guardrails.
---

# 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`

Files in this skill

  • README.md906 B
  • SKILL.md4.1 KB
  • agents/openai.yaml299 B
  • credentials.py4.6 KB
  • get_market_snapshot.py305 B
  • opend_cli.py5.1 KB
  • opend_core.py7.2 KB
  • place_order.py1 KB
  • place_order_config.py396 B
  • place_order_env.py386 B
  • place_order_keyring.py394 B
  • query_positions.py485 B
  • references/api_docs.md1.8 KB
  • references/registry_metadata.md1.5 KB
  • references/release_checklist.md1.4 KB
  • scripts/release_smoke_test.py2.3 KB
  • setup_config.py865 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.