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. Drop-in replacement for the C++ OpenD, single 11 MB binary.
-
Uniform guardrails across 4 entries
REST / gRPC / core WS / MCP share one Scope + rate / daily / market-whitelist + JSONL audit + Prometheus
/metrics. -
Model Context Protocol — stdio + HTTP transports, 19 tools, per-call API key for multi-tenancy.
-
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-api Python / C++ SDK works unchanged
Single-binary deploy — no JVM, no Python runtime, no docker required
Revoke keys live — SIGHUP takes effect within a second, no restart
LLM toolbox built-in — futu-mcp ships 19 tools with scope + limits
Zero behavior drift vs C++ OpenD — protocol / fields / error codes all aligned