FUTU-OpenD-rs¶
A Rust implementation of Futu's OpenD market-data & trading gateway — bit-for-bit compatible with the production C++ version, extended with REST / gRPC / WebSocket / CLI / MCP, all sharing one Scope + rate-limit + audit + Prometheus stack.
brew install futuleaf/tap/futu-opend-rs
Why this¶
-
Zero-cost abstractions, no GC, memory-safe. The native Rust gateway uses a sibling pure-Rust helper only for isolated Python indicator execution.
-
Uniform guardrails across 4 entries
REST / gRPC / core WS / MCP share one Scope + rate / daily / market-whitelist + JSONL audit + Prometheus
/metrics. -
MCP 2026-07-28 plus four legacy protocol dates, stdio + HTTP transports, 170 tools, and API-key-isolated private account-push resources.
-
SIGHUP hot reload · soft machine binding · fail-closed routing · Dockerfile + systemd + TLS + metrics preconfigured.
3 steps to first order¶
1. Install
One line for macOS / Linux. Windows users grab the zip from the Download page.
2. Start the gateway
Watch for INFO futu-net connected. REST is ready on :22222/health.
5 interfaces at a glance¶
| Interface | Default addr | Best for |
|---|---|---|
| FTAPI TCP | :11111 |
The native protocol used by the futu-api SDK |
| REST HTTP | :22222/api/* |
Browsers, scripts, curl |
| WebSocket | :22222/ws |
Live push (JSON + base64 body) |
| gRPC | :33333 |
Cross-language, streaming |
| MCP | stdio / HTTP | LLM agents (Claude, GPT, etc.) |
Pitch¶
- Wire-compatible — existing
futu-apiPython / C++ SDK works unchanged - Self-contained Rust deploy — no JVM or Python runtime; keep sibling
futu-indicator-workerfor 3260 Python indicators - Revoke keys live — SIGHUP takes effect within a second, no restart
- LLM toolbox built-in —
futu-mcpships 170 tools with scope + limits - Zero behavior drift vs C++ OpenD — protocol / fields / error codes all aligned