Runnable examples for the Futu OpenAPI Go SDK — market data, trading, and real-time push

Go 1.26+ Apache-2.0 SDK v0.20.0 117 examples active development
$git clone https://github.com/shing1211/futuapi4go-demo.git

Quick Start

# 1. Clone the repo
$git clone https://github.com/shing1211/futuapi4go-demo.git
$cd futuapi4go-demo

# 2. Point to your OpenD instance
$$env:FUTU_ADDR = "127.0.0.1:11111" # Windows PowerShell
# or: export FUTU_ADDR=127.0.0.1:11111 # Linux/macOS

# 3. Run any example
$go run ./examples/01_quote
# Output: HK.00700 -> 380.20 / 380.40 | high=385.00 low=376.50

Documentation

README.md

Project overview, quick start, environment variables, and common patterns

README.md →

USAGE.md

Environment setup, OpenD configuration, running examples, and SDK patterns

USAGE.md →

EXAMPLES.md

Complete reference of all 117 examples with descriptions and categories

EXAMPLES.md →

TESTING.md

How to run examples, integration tests, and OpenD requirements

TESTING.md →

TROUBLESHOOTING.md

Common errors, simulate-mode limitations, and known SDK caveats

TROUBLESHOOTING.md →

ARCHITECTURE.md

Design overview, connection management, HA failover, and WebSocket transport

ARCHITECTURE.md →

Example Categories

Connection (00–04)

TCP, RSA-encrypted TCP, WebSocket, and HA failover

View →

Market Data (01–17)

Quotes, tickers, order book, K-lines, capital flow, plates, history

View →

Trading (18–64)

Account, positions, orders, place/cancel/modify, subscriptions

View →

Advanced (65–99)

Multi-function workflows, strategies, OTel tracing, audit, lifecycle

View →

Event Contracts (102–105)

Prediction Market / Moomoo US event contract APIs

View →

Options (38–39, 81, 97a–e)

Option chain, expiration, volatility strategies, Greeks

View →

Quick Links