Skip to content
v1.4.26 Rust · 2021 edition Proprietary Free Software

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

  • Native Rust performance


    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.

  • LLM-first


    Model Context Protocol — stdio + HTTP transports, 19 tools, per-call API key for multi-tenancy.

  • Production-ready


    SIGHUP hot reload · soft machine binding · fail-closed routing · Dockerfile + systemd + TLS + metrics preconfigured.

3 steps to first order

1. Install

brew install futuleaf/tap/futu-opend-rs

One line for macOS / Linux. Windows users grab the zip from the Download page.

2. Start the gateway

futu-opend \
  --login-account YOUR_ACCOUNT \
  --login-pwd YOUR_PASSWORD \
  --rest-port 22222

Watch for INFO futu-net connected. REST is ready on :22222/health.

3. Verify + first order

# HK quote
futucli quote HK.00700

# Account list
curl http://127.0.0.1:22222/api/trd/get-acc-list

# Unlock (simulate) and place a paper order
futucli unlock-trade --env simulate
futucli place-order --symbol HK.00700 --side buy --qty 100 --env simulate

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-infutu-mcp ships 19 tools with scope + limits Zero behavior drift vs C++ OpenD — protocol / fields / error codes all aligned