Read time … min

AI-native runtime for Moomoo trading strategies

Author in Cursor, Claude Code or any AI IDE. Deploy from GitHub into a managed cloud runtime with first-class MCP control, logs and region selection.

By the TradingHost engineering team

Section 01 · At a glance

At a glance

Broker
Moomoo Financial Inc. (Futu Holdings Limited, NASDAQ: FUTU)
Broker type
US-regulated retail broker; international parent Futu Holdings also serves Hong Kong, Singapore and Australia
Asset class
US equities, US options, US futures (limited), Hong Kong equities (separate entity), Singapore equities (separate entity), crypto
Asset coverage
US equities, US options, US futures (limited products), ETFs, mutual funds (US). Hong Kong equities, options and warrants through Futu Securities International (HK) Limited. Singapore through Moomoo Financial Singapore Pte. Ltd. Crypto through Moomoo affiliates. Account access to non-US markets depends on which Futu/Moomoo entity holds the account.
Runtime model
Containerised strategy runtime
Deployment source
GitHub
Languages
Any language that runs in a container
Common integrations
Moomoo OpenAPI via OpenD local gateway client, futu-api Python SDK, Java SDK, C++ SDK, custom connectors that talk to OpenD
AI workflow integration
MCP control surface for Cursor, Claude Code, GitHub Copilot and CLI agents
TradingHost role
Runtime, deployment, logs, health checks, region selection, MCP control
Moomoo role
Broker account, OpenD client distribution, market data, execution venue, custody, settlement, tax reporting
Regulators
Moomoo Financial Inc.: SEC and FINRA registered broker-dealer (CRD 32107). SIPC member. Parent Futu Holdings entities additionally regulated by SFC (Hong Kong), MAS (Singapore), ASIC (Australia) per the country of incorporation.
US retail
Yes (Moomoo Financial Inc.). Paper trading account available.
Affiliation
TradingHost is independent and is not affiliated with Moomoo Financial Inc. or Futu Holdings Limited.

Section 02 · What Moomoo offers

What Moomoo offers

Moomoo exposes a programmatic surface through the Futu OpenAPI plus an OpenD local gateway client. The strategy connects to OpenD over a localhost socket; OpenD authenticates with Moomoo and routes orders. Coverage is US equities + options + futures (limited) via Moomoo Financial Inc., plus Hong Kong and Singapore markets through sister entities.

Markets and strategy patterns

  • US equity and options strategies via OpenAPI
  • Hong Kong equity strategies (via Futu HK entity)
  • Singapore equity strategies (via Moomoo SG entity)
  • Multi-market portfolio strategies (US + HK)
  • OpenD local-gateway client connection model
  • Paper trading account available

API surface

Product surfaces
Moomoo OpenAPI exposes US equities, US options, US futures (limited), Hong Kong equities and options, Singapore equities, depending on which Futu/Moomoo entity holds the account. Crypto trading is offered through Moomoo affiliates. Market data subscriptions are per-market and per-account.
Connection methods
OpenD local gateway client architecture: the user runs a separately-installed OpenD process that authenticates with Futu/Moomoo and exposes a localhost socket on a fixed port. Strategy SDKs (Python, Java, C++) connect to that local socket. This is similar in shape to IBKR’s TWS API model.
Authentication
Two-factor: (1) The OpenD client authenticates against Moomoo with the user’s account credentials; (2) The strategy SDK authenticates against the local OpenD with a separate trading password. The trading password is required for any order placement endpoint and is enforced inside OpenD, not on the broker server.

For specifics, refer to Moomoo

Specific endpoints, OpenD installation details, rate limits and market data entitlements live in the Moomoo OpenAPI documentation.

Section 03 · Build with AI

Build your Moomoo strategy with AI

Pick an SDK language, install OpenD as a sidecar in your TradingHost container (or run it on an adjacent host), and author your strategy in an AI IDE. Cursor, Claude Code, GitHub Copilot and CLI-based AI agents all work with the same GitHub-native deployment loop.

  • Moomoo OpenAPI via OpenD

    Strategy SDK connects to a locally running OpenD client process via localhost socket. OpenD authenticates with Moomoo and routes orders. Similar shape to IBKR’s TWS API model.

  • futu-api Python

    Official Python SDK from Futu. Wraps the OpenD socket protocol and exposes Pythonic methods for orders, account state, market data and trading subscriptions.

  • Java and C++ SDKs

    Official Java and C++ SDKs for OpenD. Use these when your trading stack is already in those languages, or when latency-sensitive logic warrants compiled code.

  • Custom connector

    In-house OpenD client wrapper. The OpenD protocol is documented; custom implementations are practical for specialised stacks.

Library support for Moomoo markets

Asset coverage is per the Futu/Moomoo entity that holds your account. The futu-api SDKs handle every market the entity supports; the limiting factor is account access, not SDK capability.

SDKUS equitiesUS optionsHK equitiesSG equitiesPaper
futu-api (Python)SupportedSupportedSupportedSupportedSupported
futu-api (Java)SupportedSupportedSupportedSupportedSupported
futu-api (C++)SupportedSupportedSupportedSupportedSupported
Custom OpenD clientSupportedSupportedSupportedSupportedSupported

✓ confirmed support per the SDK docs. Actual market access depends on which entity holds your account; the SDK exposes everything but the broker side enforces entitlement.

TradingHost does not force an SDK. It runs your project, OpenD sidecar included.

Author with AI

futu-api scaffolds well in AI IDEs: the SDK methods map cleanly to OpenAPI endpoints and the type hints are clear. The TradingHost MCP control surface closes the loop on observability and runtime management.

Section 04 · Run on TradingHost

Run your code on TradingHost

Moomoo provides the broker account, OpenD client distribution, market data and execution venue. TradingHost provides the production environment where both your strategy and the OpenD sidecar run.

Instead of running strategy code and OpenD on a laptop, desktop machine, generic VPS or manually configured server, you deploy from GitHub into a TradingHost-managed container runtime that hosts both processes together.

You

  • Your repo contains your code.
  • Your deployment defines how it runs.
  • Your strategy connects to Moomoo via OpenD.

TradingHost

  • Keeps the runtime online.
  • Surfaces logs and health checks.
  • Region selection.
  • Controlled deployment surface.

Deployment flow

  1. STEP 01

    Connect GitHub

    Authorise TradingHost to access your GitHub account.

  2. STEP 02

    Link a repo or start from a starter

    Point TradingHost at your existing Moomoo OpenAPI strategy repo, or fork a futu-api Python starter that includes an OpenD sidecar configuration.

  3. STEP 03

    Deploy with OpenD as a sidecar

    Pick a region (US-East for US markets, EU may apply for European session activity), supply your Moomoo account credentials and trading password as environment values, and deploy. The OpenD client runs as a sidecar container alongside your strategy; both share a localhost socket inside the Kubernetes pod.

  4. STEP 04

    Monitor logs and health

    Watch live logs, health and runtime state from the TradingHost dashboard. The same surface is reachable through MCP from any AI IDE. OpenD logs are captured alongside strategy logs.

  5. STEP 05

    Update and redeploy

    Push changes to your GitHub main branch and TradingHost redeploys both the strategy and the OpenD sidecar.

Section 05 · Operational notes

Operational notes for Moomoo

Things that bite you when you actually run a Moomoo strategy in a containerised cloud runtime. The OpenD local-gateway model is the dominant operational reality. Every claim below is quoted or paraphrased from Moomoo’s OpenAPI documentation.

  1. 01 · OpenD sidecar

    OpenD is a local gateway, not a remote API

    Moomoo’s programmatic surface is the OpenAPI exposed via OpenD, a separately-installed gateway client. The strategy SDK connects to OpenD over a localhost socket. OpenD authenticates with Moomoo, holds the session, and routes orders. For cloud deployment, run OpenD as a sidecar container in the same pod as the strategy. This is similar in shape to IBKR’s TWS API model.

  2. 02 · Trading password

    Trading password is required for order endpoints

    After OpenD authenticates with Moomoo using account credentials, the strategy SDK must also supply a trading password for any order placement call. The trading password is set on the Moomoo account and is enforced inside OpenD, not on the broker server. Store the trading password in TradingHost Secrets and supply it to OpenD at startup.

  3. 03 · Entity / market access

    Market access depends on which Futu/Moomoo entity holds the account

    Moomoo Financial Inc. (US entity, FINRA CRD 32107) provides US equities, options and limited futures. Futu Securities International (HK) and Moomoo Financial Singapore are separate entities serving HK and SG markets. The OpenAPI exposes everything but the broker side rejects orders for markets outside your entity’s access. Plan strategies around the markets your account is permitted to trade.

  4. 04 · Market data subs

    Real-time data subscriptions are per-market and per-account

    Moomoo charges market data subscriptions per market (US Level 1, US Level 2, HK, SG) and per-account. Without an active subscription, the OpenAPI returns delayed data or empty responses for that market. Confirm subscriptions on the Moomoo account before deploying a strategy that depends on real-time data.

  5. 05 · Paper trading

    Paper account uses the same OpenAPI surface with a different account ID

    Moomoo provides a paper trading account that runs against the same OpenAPI endpoints with a paper-account-specific account ID. Strategy code does not change between paper and live; the account ID and trading password configuration does. Use paper as the test environment before promoting to live.

Section 06 · Built for

Built for

TradingHost Moomoo runtimes are best suited to:

  • Developers building strategies in AI IDEs (Cursor, Claude Code)
  • Multi-market traders (US + HK + SG)
  • Hong Kong equity strategy authors
  • Singapore equity strategy authors
  • US-account quants using futu-api Python

Connecting GitHub and creating your first strategy is free.

Section 08 · FAQ

FAQ

No. TradingHost is independent and is not affiliated with Moomoo Financial Inc. or Futu Holdings Limited.

No. TradingHost is a runtime for trading strategy code. Moomoo Financial Inc. is the US broker-dealer (FINRA CRD 32107), a SIPC member. Your account, custody, market access, settlement and tax reporting all sit with Moomoo.

OpenD is Moomoo’s local gateway client. It is a separately-installed process that authenticates with Moomoo, holds the trading session, and exposes a localhost socket the strategy SDK connects to. The strategy never talks directly to Moomoo’s servers; OpenD is the relay. This is similar in shape to Interactive Brokers’ TWS API model.

Yes, as a sidecar. TradingHost runs OpenD as a sidecar container in the same Kubernetes pod as the strategy. Both share a localhost socket inside the pod. OpenD authenticates with Moomoo at startup using credentials supplied via TradingHost Secrets.

Yes, if your account is with the Futu Hong Kong entity. Moomoo Financial Inc. (US entity) holds US-market access; HK and SG access is through separate Futu entities. The OpenAPI exposes every market the SDK can address; the broker side enforces what your account is entitled to.

No. Your strategy code connects to OpenD and sends order instructions; OpenD forwards them to Moomoo. TradingHost provides the runtime where both processes run.

No. Moomoo API access is provided by Moomoo via the OpenAPI and OpenD client. You are responsible for your Moomoo account, OpenD client distribution and compliance with Moomoo’s terms.

Any language that runs in a container. Moomoo ships official SDKs in Python (futu-api), Java and C++. Other languages can talk to OpenD directly over its documented socket protocol.

Open a Moomoo account with the entity that serves your market. Enable OpenAPI on the account and obtain your trading password. Connect your GitHub repo containing the strategy code, link it to TradingHost, and deploy with OpenD configured as a sidecar.

In your GitHub-controlled secrets workflow. The Moomoo account password is passed to OpenD at sidecar startup; the trading password is passed to the strategy SDK at strategy startup.

No. Strategies should never need withdrawal or money-movement permissions.

Yes. TradingHost supports MCP-based control for AI IDEs including Cursor, Claude Code, GitHub Copilot and CLI-based AI agents.

No. PDT (FINRA Rule 4210) is enforced by Moomoo on US accounts, not by TradingHost. Margin accounts under $25,000 are subject to PDT restrictions on day trading.

No. Tax forms come from the Moomoo entity that holds your account, not from TradingHost.

No. SIPC covers your Moomoo US brokerage account (Moomoo Financial Inc.) up to $500,000 including $250,000 in cash. Non-US entities are covered by their local regulators. TradingHost’s runtime is not SIPC-insured because TradingHost is not a broker.

TradingHost runs in the EU and US-East regions. US-East is the natural pick for Moomoo US accounts; the EU region covers European session activity. Hong Kong and Singapore region selection is on the roadmap.

No. TradingHost is focused on production runtime and deployment. Backtesting belongs in your research stack, framework or AlgoBuilder.