REST API Complete Reference¶
Added in v1.4.85. Auto-generated by the FutuOpenD-rs build pipeline and refreshed with every daemon release.
This page covers all 85 REST endpoints of futu-opend,
organized into 9 functional groups. Each endpoint documents:
- HTTP method + URL
- Backend
proto_id - Required auth scope
- Parameter docs (in proto definitions)
- Error hints
- curl example
Quick nav:
| Group | Endpoints | Link |
|---|---|---|
| System / Status | 6 | System / Status |
| Quote Subscriptions | 5 | Quote Subscriptions |
| Quote Queries | 18 | Quote Queries |
| Plates / Filter / Metadata | 8 | Plates / Filter / Metadata |
| Reference / Derivatives | 11 | Reference / Derivatives |
| Price Reminders | 2 | Price Reminders |
| Trading Accounts (Read) | 26 | Trading Accounts (Read) |
| Trading Write | 6 | Trading Write |
| Admin | 3 | Admin |
Global conventions¶
- Base URL:
http://127.0.0.1:22499(default REST port, change via--rest-port) - Content-Type:
application/json - Auth:
Authorization: Bearer <API_KEY>(ifkeys.jsonis configured; otherwise legacy mode without auth — and since v1.4.86 fail-closed is the production default) -
Response envelope:
ret_type == 0means success; other values see common error codes. -
Field naming: v1.4.83+ accepts aliases (SDK-style
code/stocks/trd_env); canonical is snake_case (symbol/symbols/env). At the REST layer, enum fields (trd_market/trd_env/kl_type/op/reference_type…) accept int only (½/3...); the string form ("HK"/"US"/"day") is supported only at the MCP layer (futu_*tools) which auto-converts to int. Unknown fields since v1.4.84 loud fail (unknown fielderror). -
Rate / limits: Controlled via startup flags (
--allowed-markets,--max-order-value, etc.). Seedocs/guide/auth.en.md.
System / Status¶
Health checks, global state, user info, latency stats. No auth required.
GET /api/delay-statistics¶
proto_id: GET_DELAY_STATISTICS (1006)
Scope: — (public)
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
POST /api/delay-statistics¶
proto_id: GET_DELAY_STATISTICS (1006)
Scope: — (public)
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"type_list":[1],"qot_push_stage":1}' \
http://127.0.0.1:22499/api/delay-statistics
GET /api/global-state¶
proto_id: GET_GLOBAL_STATE (1002)
Scope: — (public)
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
GET /api/ping¶
proto_id: GET_GLOBAL_STATE (1002)
Scope: — (public)
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
GET /api/push-subscriber-info¶
proto_id: — (non-proto / no backend forwarding)
Scope: — (public)
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
GET /api/user-info¶
proto_id: GET_USER_INFO (1005)
Scope: — (public)
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
Quote Subscriptions¶
Subscribe/unsubscribe quote push, query subscription state. Receive push via WebSocket /ws. Since v1.4.110 /api/subscribe and /api/unsubscribe require qot:state (user-state write); transitional qot:read keys still accepted.
POST /api/query-subscription¶
proto_id: QOT_GET_SUB_INFO (3003)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"is_req_all_conn":true}' \
http://127.0.0.1:22499/api/query-subscription
POST /api/used-quota¶
proto_id: GET_USED_QUOTA (1010)
Scope: qot:read
Request / response: empty body or {}. Returns current daemon counters:
used_sub_quota and used_k_line_quota.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{}' \
http://127.0.0.1:22499/api/used-quota
GET /api/sub-info¶
proto_id: QOT_GET_SUB_INFO (3003)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
POST /api/subscribe¶
proto_id: QOT_SUB (3001)
Scope: qot:state
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"symbols":["HK.00700"],"sub_types":[1],"is_sub_or_un_sub":true}' \
http://127.0.0.1:22499/api/subscribe
POST /api/unsubscribe¶
proto_id: QOT_SUB (3001)
Scope: qot:state
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"symbols":["HK.00700"],"sub_types":[1],"is_sub_or_un_sub":false}' \
http://127.0.0.1:22499/api/unsubscribe
GET /ws¶
proto_id: — (non-proto / no backend forwarding)
Scope: — (public)
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
Quote Queries¶
Real-time quotes, K-line, order book, broker queue, time-sharing, ticker, ticker statistics, risk-free rate, spread table. Requires qot:read.
POST /api/broker¶
proto_id: QOT_GET_BROKER (3014)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"symbol":"HK.00700"}' \
http://127.0.0.1:22499/api/broker
POST /api/capital-distribution¶
proto_id: QOT_GET_CAPITAL_DISTRIBUTION (3212)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"symbol":"HK.00700"}' \
http://127.0.0.1:22499/api/capital-distribution
POST /api/capital-flow¶
proto_id: QOT_GET_CAPITAL_FLOW (3211)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"symbol":"HK.00700","period_type":1}' \
http://127.0.0.1:22499/api/capital-flow
POST /api/history-kl-quota¶
proto_id: QOT_REQUEST_HISTORY_KL_QUOTA (3104)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1,"trd_market":1},"begin_time":"2026-01-01 00:00:00","end_time":"2026-04-01 23:59:59"}}' \
http://127.0.0.1:22499/api/history-kl-quota
POST /api/history-kline¶
proto_id: QOT_REQUEST_HISTORY_KL (3103)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Note: REST kl_type accepts integers only (e.g. 1=Day / 2=Week / 3=Month / 5=Min1 / 6=Min5 / 7=Min15 / 8=Min30 / 9=Min60 / 10=Min3 / 11=Min4); the string form ("day") is supported only at the MCP layer. Field count is alias-mapped to proto req_num (both accepted).
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"symbol":"HK.00700","rehab_type":0,"kl_type":1,"max_count":100,"begin_time":"2026-01-01 00:00:00","end_time":"2026-04-01 23:59:59"}' \
http://127.0.0.1:22499/api/history-kline
POST /api/kline¶
proto_id: QOT_GET_KL (3006)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Note: Same as /api/history-kline — REST kl_type accepts integers only; proto field is canonical req_num, count is the v1.4.83+ alias.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"symbol":"HK.00700","rehab_type":0,"kl_type":1,"req_num":100}' \
http://127.0.0.1:22499/api/kline
POST /api/market-state¶
proto_id: QOT_GET_MARKET_STATE (3223)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"symbols":["HK.00700"]}' \
http://127.0.0.1:22499/api/market-state
POST /api/orderbook¶
proto_id: QOT_GET_ORDER_BOOK (3012)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"symbol":"HK.00700","depth":10}' \
http://127.0.0.1:22499/api/orderbook
POST /api/quote¶
proto_id: QOT_GET_BASIC_QOT (3004)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"symbol":"HK.00700"}' \
http://127.0.0.1:22499/api/quote
GET /api/risk-free-rate¶
proto_id: QOT_GET_RISK_FREE_RATE (20231)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Purpose: Risk-free rate for HK / US / JP, required for Black-Scholes option pricing.
Field table (no required field):
| Field | Type | Required | Description |
|---|---|---|---|
rate_time |
int64 | optional | Unix ms timestamp; omit for latest rate |
Response: s2c includes hk_rate_pct / us_rate_pct / jp_rate_pct (percent, e.g. 4.5 for 4.5%). The raw uint64 (×10^9) values are also exposed so callers can verify on their own.
Example:
POST /api/risk-free-rate¶
proto_id: QOT_GET_RISK_FREE_RATE (20231)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Purpose: Risk-free rate for HK / US / JP, required for Black-Scholes option pricing.
Field table (no required field):
| Field | Type | Required | Description |
|---|---|---|---|
rate_time |
int64 | optional | Unix ms timestamp; omit for latest rate |
Response: s2c includes hk_rate_pct / us_rate_pct / jp_rate_pct (percent, e.g. 4.5 for 4.5%). The raw uint64 (×10^9) values are also exposed so callers can verify on their own.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{}' \
http://127.0.0.1:22499/api/risk-free-rate
POST /api/rt¶
proto_id: QOT_GET_RT (3008)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"symbol":"HK.00700"}' \
http://127.0.0.1:22499/api/rt
POST /api/snapshot¶
proto_id: QOT_GET_SECURITY_SNAPSHOT (3203)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"symbol":"HK.00700"}' \
http://127.0.0.1:22499/api/snapshot
GET /api/spread-table¶
proto_id: QOT_GET_SPREAD_TABLE (6503)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Purpose: Spread table for tick-size lookup across price bands (e.g. HK stocks 0.01~0.25 → step 0.001). Required for client-side price validation in PlaceOrder / ModifyOrder.
Field table (no business parameter):
| Field | Type | Required | Description |
|---|---|---|---|
reserved |
int | optional | Placeholder; always returns the full spread tables |
Response: s2c.spread_table_list contains each spread table (spread_code + spread_item_list); each item carries price_from / price_to / value as f64 (raw int64 ÷ 1e9 already applied).
Example:
POST /api/spread-table¶
proto_id: QOT_GET_SPREAD_TABLE (6503)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Purpose: Spread table for tick-size lookup across price bands (e.g. HK stocks 0.01~0.25 → step 0.001). Required for client-side price validation in PlaceOrder / ModifyOrder.
Field table (no business parameter):
| Field | Type | Required | Description |
|---|---|---|---|
reserved |
int | optional | Placeholder; always returns the full spread tables |
Response: s2c.spread_table_list contains each spread table (spread_code + spread_item_list); each item carries price_from / price_to / value as f64 (raw int64 ÷ 1e9 already applied).
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{}' \
http://127.0.0.1:22499/api/spread-table
POST /api/static-info¶
proto_id: QOT_GET_STATIC_INFO (3202)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"symbols":["HK.00700","US.AAPL"]}' \
http://127.0.0.1:22499/api/static-info
POST /api/ticker¶
proto_id: QOT_GET_TICKER (3010)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"symbol":"HK.00700","count":50}' \
http://127.0.0.1:22499/api/ticker
POST /api/ticker-statistic¶
proto_id: QOT_GET_TICKER_STATISTIC (6365)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Purpose: Ticker statistics. Aggregates per-tick deals into time intervals (cumulative volume / turnover / avg price).
Field table:
| Field | Type | Required | Description |
|---|---|---|---|
security or symbol |
object/string | ✅ | Underlying; shorthand "HK.00700" |
interval_type |
int | ✅ | Aggregation granularity enum (see proto) |
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"symbol":"HK.00700","interval_type":1}' \
http://127.0.0.1:22499/api/ticker-statistic
Plates / Filter / Metadata¶
Plate list/stocks, stock filter, trading days, suspend, code change, IPO calendar.
POST /api/code-change¶
proto_id: QOT_GET_CODE_CHANGE (3216)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"search":{"code_change_type_list":[1],"time_filter_list":[{"type":1,"begin_time":"2026-01-01","end_time":"2026-04-01"}]}}' \
http://127.0.0.1:22499/api/code-change
POST /api/ipo-list¶
proto_id: QOT_GET_IPO_LIST (3217)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Field table:
| Field | Type | Required | Description |
|---|---|---|---|
market |
int | ✅ | QotMarket: 1=HK / 11=US / 21=CN_SH / 22=CN_SZ (SH+SZ merge as A-share) |
Note: The backend distinguishes HK / US / A-share (SH and SZ merged). Wrong market returns invalid-market.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"market":1}}' \
http://127.0.0.1:22499/api/ipo-list
POST /api/list-plates¶
proto_id: QOT_GET_PLATE_SET (3204)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"market":1,"plate_set_type":0}' \
http://127.0.0.1:22499/api/list-plates
POST /api/plate-security¶
proto_id: QOT_GET_PLATE_SECURITY (3205)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"plate":{"market":1,"code":"BK1001"}}' \
http://127.0.0.1:22499/api/plate-security
POST /api/plate-set¶
proto_id: QOT_GET_PLATE_SET (3204)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"market":1,"plate_set_type":0}' \
http://127.0.0.1:22499/api/plate-set
POST /api/stock-filter¶
proto_id: QOT_STOCK_FILTER (3215)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"begin":0,"num":50,"market":1,"plate":{"market":1,"code":"BK1001"}}' \
http://127.0.0.1:22499/api/stock-filter
POST /api/suspend¶
proto_id: QOT_GET_SUSPEND (3201)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"symbols":["HK.00700"],"begin_time":"2026-01-01","end_time":"2026-04-01"}' \
http://127.0.0.1:22499/api/suspend
POST /api/trading-days¶
proto_id: QOT_REQUEST_TRADE_DATE (3219)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"market":1,"begin_time":"2026-01-01","end_time":"2026-04-01"}' \
http://127.0.0.1:22499/api/trading-days
Reference / Derivatives¶
Warrant references, option chain, option expiration dates, future info, rehab, watchlist, holding change. Since v1.4.110 /api/modify-user-security requires qot:state (watchlist mutation); transitional qot:read keys still accepted.
POST /api/future-info¶
proto_id: QOT_GET_FUTURE_INFO (3218)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Field table:
| Field | Type | Required | Description |
|---|---|---|---|
security_list or symbols |
array | ✅ | Futures contracts; e.g. ["HK.HSImain", "US.NQmain"] |
Note: An empty security_list triggers a backend no stock specified error; supply at least one contract.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"securityList":[{"market":1,"code":"HSImain"}]}}' \
http://127.0.0.1:22499/api/future-info
POST /api/get-reference¶
proto_id: QOT_GET_REFERENCE (3206)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Field table:
| Field | Type | Required | Description |
|---|---|---|---|
security or symbol |
object/string | ✅ | Underlying stock; shorthand "HK.00700" |
reference_type |
int | ✅ | 1=Warrant / 2=Future (main-continuous related contracts) |
Option NOT supported: The backend ReferenceType proto only defines Warrant / Future. Passing "reference_type":3 returns unsupported reference type. The MCP tool futu_get_reference likewise rejects anything other than warrant / future.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"symbol":"HK.00700","reference_type":1}' \
http://127.0.0.1:22499/api/get-reference
POST /api/holding-change¶
proto_id: QOT_GET_HOLDING_CHANGE_LIST (3208)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
⚠️ Deprecated: The upstream backend abandoned this endpoint after 2020-12-21. Calls return
ret_type=-1with"will be abandoned after 2020-12-21". No longer guaranteed to work; do not use in new code.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"symbol":"HK.00700","holder_category":1,"begin_time":"2026-01-01","end_time":"2026-04-01"}' \
http://127.0.0.1:22499/api/holding-change
POST /api/modify-user-security¶
proto_id: QOT_MODIFY_USER_SECURITY (3214)
Scope: qot:state
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Stateful write: Mutates the user's watchlist. Unknown fields are loud-fail rejected since v1.4.84, but a successful call cannot be rolled back.
Field table (REST accepts int enums only):
| Field | Type | Required | Description |
|---|---|---|---|
group_name |
string | ✅ | Group name; ties resolve to first match |
op |
int | ✅ | 1=Add / 2=Del / 3=MoveOut |
security_list |
array | ✅ | Stock list; each item {market: int, code: string} |
No top-level symbol/symbols shorthand: must use explicit security_list.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"group_name":"自选","op":1,"security_list":[{"market":1,"code":"00700"}]}' \
http://127.0.0.1:22499/api/modify-user-security
POST /api/option-chain¶
proto_id: QOT_GET_OPTION_CHAIN (3209)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Field table:
| Field | Type | Required | Description |
|---|---|---|---|
owner or symbol |
object/string | ✅ | Underlying stock (HK/US blue chips, HSI/HSCEI/major US indices); shorthand "HK.00700" |
begin_time |
string | ✅ | Strike date start (YYYY-MM-DD) |
end_time |
string | ✅ | Strike date end (YYYY-MM-DD) |
condition |
object | optional | Option filter (type / strike range / quote) |
Owner shorthand: Only top-level "owner":"HK.00700" auto-expands to a Security object; do not pass "security":{...} explicitly (proto field is owner, not security).
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"owner":"HK.00700","begin_time":"2026-05-01","end_time":"2026-06-01"}' \
http://127.0.0.1:22499/api/option-chain
POST /api/option-expiration-date¶
proto_id: QOT_GET_OPTION_EXPIRATION_DATE (3224)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Field table:
| Field | Type | Required | Description |
|---|---|---|---|
owner or symbol |
object/string | ✅ | Underlying stock; shorthand "HK.00700" |
index_option_type |
int | optional | HSI / HSCEI only: IndexOptionType |
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"owner":"HK.00700"}' \
http://127.0.0.1:22499/api/option-expiration-date
POST /api/owner-plate¶
proto_id: QOT_GET_OWNER_PLATE (3207)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Field table:
| Field | Type | Required | Description |
|---|---|---|---|
security_list or symbols |
array | ✅ | Stock array; shorthand ["HK.00700"] auto-expands |
Note: Empty security_list returns empty plate list with no business meaning; supply at least one stock.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"symbols":["HK.00700"]}' \
http://127.0.0.1:22499/api/owner-plate
POST /api/reference¶
proto_id: QOT_GET_REFERENCE (3206)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Note: /api/reference is equivalent to /api/get-reference (same proto_id 3206); /api/get-reference is the v1.4.74 alias. Same field contract — see /api/get-reference section.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"symbol":"HK.00700","reference_type":1}' \
http://127.0.0.1:22499/api/reference
POST /api/rehab¶
proto_id: QOT_REQUEST_REHAB (3105)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"symbols":["HK.00700"]}' \
http://127.0.0.1:22499/api/rehab
POST /api/user-security¶
proto_id: QOT_GET_USER_SECURITY (3213)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"group_name":"自选"}' \
http://127.0.0.1:22499/api/user-security
POST /api/warrant¶
proto_id: QOT_GET_WARRANT (3210)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Core field table:
| Field | Type | Required | Description |
|---|---|---|---|
begin |
int | ✅ | Start row (pagination) |
num |
int | ✅ | Page size (≤200) |
sort_field |
int | ✅ | WarrantField sort enum |
ascend |
bool | ✅ | Ascending order |
owner or symbol |
object/string | optional | Underlying; shorthand "HK.00700" |
Full field set: includes type_list / issuer_list / strike-price ranges and other filters; see proto definition.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"begin":0,"num":50,"sort_field":1,"ascend":false,"owner":"HK.00700"}' \
http://127.0.0.1:22499/api/warrant
Price Reminders¶
Query/set/modify/delete price reminders. Since v1.4.110 /api/set-price-reminder requires qot:state; /api/price-reminder (read) stays qot:read.
POST /api/price-reminder¶
proto_id: QOT_GET_PRICE_REMINDER (3221)
Scope: qot:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"symbol":"HK.00700"}' \
http://127.0.0.1:22499/api/price-reminder
POST /api/set-price-reminder¶
proto_id: QOT_SET_PRICE_REMINDER (3220)
Scope: qot:state
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Stateful write: Add / modify / delete a price alert.
Field table (REST accepts int enums only; proto field is type, not reminder_type):
| Field | Type | Required | Description |
|---|---|---|---|
security or symbol |
object/string | ✅ | Stock; shorthand "HK.00700" |
op |
int | ✅ | 1=Add / 2=Del / 3=Enable / 4=Disable / 5=Modify / 6=DelAll |
key |
int64 | for Modify/Del | Alert key from GetPriceReminder |
type |
int | for Add | PriceReminderType (1=PriceUp / 2=PriceDown / ...) |
freq |
int | for Add | PriceReminderFreq (1=Always / 2=OnceADay / 3=OnlyOnce); on Modify the backend preserves the old value when omitted |
value |
f64 | for Add | Alert value (3 decimals max); on Modify the backend preserves the old value when omitted |
note |
string | optional | Note (≤20 chars in CN) |
Add (op=1) required: type + freq + value. The gateway aligns with the reference implementation and rejects Add without all three.
Modify (op=5) does not require type / freq / value: the gateway fetches the existing alert first, applies user-provided field overrides, and preserves omitted fields (aligning with the overwrite-style Modify semantics).
reminder_session_list (optional, array): PriceReminderMarketStatus values — 1=Open / 2=USPre / 3=USAfter / 4=USOverNight. Any value outside 1..4 is loud-rejected by the gateway (-1 + error text). For US stocks an empty list defaults to [1, 2, 3]; for non-US securities the list is cleared.
Note: REST does not accept "op":"SetAdd" string form; only MCP layer maps strings to int.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"symbol":"HK.00700","op":1,"type":1,"freq":1,"value":300.0}' \
http://127.0.0.1:22499/api/set-price-reminder
Trading Accounts (Read)¶
Account list, funds, positions, today orders/deals, history orders/deals, max trade qty, margin ratio, order fee. Requires acc:read.
POST /api/acc-cash-flow¶
proto_id: TRD_FLOW_SUMMARY (2226)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1,"trd_market":1},"clearing_date":"2026-04-01"}}' \
http://127.0.0.1:22499/api/acc-cash-flow
POST /api/account-flag¶
proto_id: TRD_GET_ACCOUNT_FLAG (22705)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1}}}' \
http://127.0.0.1:22499/api/account-flag
GET /api/accounts¶
proto_id: TRD_GET_ACC_LIST (2001)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
POST /api/biz-group¶
proto_id: TRD_GET_BIZ_GROUP (22703)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1,"trd_market":1}}}' \
http://127.0.0.1:22499/api/biz-group
POST /api/bond-answer-state¶
proto_id: TRD_GET_BOND_ANSWER_STATE (22709)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1}}}' \
http://127.0.0.1:22499/api/bond-answer-state
POST /api/bond-position-list¶
proto_id: TRD_GET_BOND_POSITION_LIST (22708)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1}}}' \
http://127.0.0.1:22499/api/bond-position-list
POST /api/bond-single-asset¶
proto_id: TRD_GET_BOND_SINGLE_ASSET (22707)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1}}}' \
http://127.0.0.1:22499/api/bond-single-asset
POST /api/bond-total-asset¶
proto_id: TRD_GET_BOND_TOTAL_ASSET (22706)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1}}}' \
http://127.0.0.1:22499/api/bond-total-asset
POST /api/bond-trade-reminder¶
proto_id: TRD_GET_BOND_TRADE_REMINDER (22710)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1}}}' \
http://127.0.0.1:22499/api/bond-trade-reminder
POST /api/cash-detail¶
proto_id: TRD_GET_CASH_DETAIL (22702)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1},"flow_id":"<flow_id>"}}' \
http://127.0.0.1:22499/api/cash-detail
POST /api/cash-log¶
proto_id: TRD_GET_CASH_LOG (22701)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1},"begin_time":"2026-01-01","end_time":"2026-04-01"}}' \
http://127.0.0.1:22499/api/cash-log
POST /api/flow-summary¶
proto_id: TRD_FLOW_SUMMARY (2226)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1,"trd_market":1},"clearing_date":"2026-04-01"}}' \
http://127.0.0.1:22499/api/flow-summary
POST /api/funds¶
proto_id: TRD_GET_FUNDS (2101)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
currency parameter (integer enum, matches proto/Trd_Common.proto::Currency):
| int | currency | int | currency |
|---|---|---|---|
| 1 | HKD | 5 | SGD |
| 2 | USD | 6 | AUD |
| 3 | CNH | 7 | CAD |
| 4 | JPY | 8 | MYR |
- Universal / futures accounts:
currencyis required. Missing it returns aMissingCurrencyerror listing the currencies actually supported by this account (behavior since v1.4.106). - Single-market / simulated accounts:
currencyis optional; the account's native currency is used when omitted. - Integer only. Strings (e.g.
"HKD") raiseinvalid type: string, expected i32. - The currencies an account supports are returned by the backend; unsupported values return
InvalidCurrencylisting the available set (since v1.4.105).
Example (universal account, USD-quoted):
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1,"trd_market":1},"currency":2}}' \
http://127.0.0.1:22499/api/funds
Example (single-market account, no currency):
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1,"trd_market":1}}}' \
http://127.0.0.1:22499/api/funds
POST /api/history-order-fills¶
proto_id: TRD_GET_HISTORY_ORDER_FILL_LIST (2222)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1,"trd_market":1},"begin_time":"2026-01-01 00:00:00","end_time":"2026-04-01 23:59:59"}}' \
http://127.0.0.1:22499/api/history-order-fills
POST /api/history-orders¶
proto_id: TRD_GET_HISTORY_ORDER_LIST (2221)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1,"trd_market":1},"begin_time":"2026-01-01 00:00:00","end_time":"2026-04-01 23:59:59"}}' \
http://127.0.0.1:22499/api/history-orders
GET /api/list-accounts¶
proto_id: TRD_GET_ACC_LIST (2001)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
POST /api/margin-info¶
proto_id: TRD_GET_MARGIN_INFO (22704)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1,"trd_market":1}}}' \
http://127.0.0.1:22499/api/margin-info
POST /api/margin-ratio¶
proto_id: TRD_GET_MARGIN_RATIO (2223)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1,"trd_market":1},"symbols":["HK.00700"]}}' \
http://127.0.0.1:22499/api/margin-ratio
POST /api/max-trd-qtys¶
proto_id: TRD_GET_MAX_TRD_QTYS (2111)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1,"trd_market":1},"code":"00700","price":300.0,"order_type":1}}' \
http://127.0.0.1:22499/api/max-trd-qtys
POST /api/order-fee¶
proto_id: TRD_GET_ORDER_FEE (2225)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1},"order_id_ex_list":["987"]}}' \
http://127.0.0.1:22499/api/order-fee
POST /api/order-fills¶
proto_id: TRD_GET_ORDER_FILL_LIST (2211)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1,"trd_market":1}}}' \
http://127.0.0.1:22499/api/order-fills
POST /api/orders¶
proto_id: TRD_GET_ORDER_LIST (2201)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1,"trd_market":1}}}' \
http://127.0.0.1:22499/api/orders
POST /api/positions¶
proto_id: TRD_GET_POSITION_LIST (2102)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1,"trd_market":1}}}' \
http://127.0.0.1:22499/api/positions
POST /api/reconfirm-order¶
proto_id: TRD_RECONFIRM_ORDER (2237)
Scope: trade:real or trade:simulate (based on env)
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456},"order_id":"987","reconfirm_op":1}}' \
http://127.0.0.1:22499/api/reconfirm-order
GET /api/token-state¶
proto_id: GET_TOKEN_STATE (1326)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
POST /api/token-state¶
proto_id: GET_TOKEN_STATE (1326)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456}}}' \
http://127.0.0.1:22499/api/token-state
Trading Write¶
Place/modify/cancel order, cancel-all, unlock trade cipher, account push sub. Place/modify/cancel requires trade:real / trade:simulate (env-double-check) + --enable-trading. Since v1.4.104 /api/unlock-trade strictly requires trade:unlock (no longer satisfied by other trade super-scopes).
POST /api/cancel-all-order¶
proto_id: TRD_MODIFY_ORDER (2205)
Scope: trade:real or trade:simulate (based on env)
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1,"trd_market":1}}}' \
http://127.0.0.1:22499/api/cancel-all-order
POST /api/modify-order¶
proto_id: TRD_MODIFY_ORDER (2205)
Scope: trade:real or trade:simulate (based on env)
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_market":1},"order_id":"987","op":1}}' \
http://127.0.0.1:22499/api/modify-order
POST /api/order¶
proto_id: TRD_PLACE_ORDER (2202)
Scope: trade:real or trade:simulate (based on env)
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"c2s":{"header":{"acc_id":123456,"trd_env":1,"trd_market":1},"side":1,"code":"00700","qty":100,"price":300.0}}' \
http://127.0.0.1:22499/api/order
POST /api/sub-acc-push¶
proto_id: — (non-proto / no backend forwarding)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"acc_id_list":[123456]}' \
http://127.0.0.1:22499/api/sub-acc-push
POST /api/unlock-trade¶
proto_id: TRD_UNLOCK_TRADE (2005)
Scope: trade:unlock
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"unlock":true,"pwd_md5":"<md5-of-trade-password>"}' \
http://127.0.0.1:22499/api/unlock-trade
POST /api/unsub-acc-push¶
proto_id: — (non-proto / no backend forwarding)
Scope: acc:read
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{"acc_id_list":[123456]}' \
http://127.0.0.1:22499/api/unsub-acc-push
Admin¶
Daemon management endpoints. Requires admin scope.
POST /api/admin/reload¶
proto_id: — (non-proto / no backend forwarding)
Scope: admin
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{}' \
http://127.0.0.1:22499/api/admin/reload
POST /api/admin/shutdown¶
proto_id: — (non-proto / no backend forwarding)
Scope: admin
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
-d '{}' \
http://127.0.0.1:22499/api/admin/shutdown
GET /api/admin/status¶
proto_id: — (non-proto / no backend forwarding)
Scope: admin
Parameters / Response: See proto definition. Fields use snake_case; v1.4.83+ alias support + v1.4.84+ enum int/string dual-accept.
Example:
Further reading¶
- rustdoc API: https://futuapi.com/api/
- MCP tool docs: /reference/mcp-tools
- gRPC proto_id table: /reference/grpc-api
- Common error codes + pits: /guide/common-pitfalls