futu
Installation
SKILL.md
What this is — read this first
🖥️ Local-gateway broker. Futu does not expose a public cloud API. Instead you run a gateway program called OpenD on a machine, log into it with your Futu account, and this CLI talks to OpenD over a local socket (default 127.0.0.1:11111). Your Futu credentials live inside OpenD — they never reach this skill.
⚠️ This means it will NOT work from the Starchild container by default, because OpenD runs on your computer, and the container's 127.0.0.1 is the container itself (a different machine). Two ways to use it:
- Run locally — run OpenD + this script on your own computer where OpenD is logged in. (simplest)
- Bridge the network — run OpenD on a host the container can reach, then set
FUTU_HOST/FUTU_PORTto point at it (you handle the network/firewall/security yourself — exposing OpenD beyond localhost is risky; bind it tightly).
If status reports the gateway is not reachable, this is why.
Set up OpenD (one time)
- Download OpenD for your OS from the Futu OpenAPI page (富途牛牛 / moomoo → OpenAPI). It comes as a GUI app and a command-line build.
- You need a funded/opened Futu or moomoo account with OpenAPI permission enabled (apply in-app if needed).
- Launch OpenD and log in with your Futu credentials (+ phone/2FA). Confirm the API port it listens on (default
11111). - Keep OpenD running while you use this skill. For paper trading, make sure your account has a 模拟 / paper (SIMULATE) sub-account.