Skip to content

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 68 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 13 Quote Queries
Plates / Filter / Metadata 8 Plates / Filter / Metadata
Reference / Derivatives 11 Reference / Derivatives
Price Reminders 2 Price Reminders
Trading Accounts (Read) 14 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> (if keys.json is configured; otherwise legacy mode without auth — see CLAUDE.md SEC-003 Q4)
  • Response envelope:

    {
      "ret_type": 0,
      "ret_msg": null,
      "err_code": null,
      "s2c": { ...business payload... }
    }
    
    ret_type == 0 means 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). v1.4.84+ dual-accept int OR string (enum fields). Unknown fields since v1.4.84 loud fail (unknown field error).

  • Rate / limits: Controlled via startup flags (--allowed-markets, --max-order-value, etc.). See docs/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:

curl -H 'Authorization: Bearer $FUTU_API_KEY' \
  http://127.0.0.1:22499/api/delay-statistics

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 '{}' \
  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:

curl -H 'Authorization: Bearer $FUTU_API_KEY' \
  http://127.0.0.1:22499/api/global-state

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:

curl -H 'Authorization: Bearer $FUTU_API_KEY' \
  http://127.0.0.1:22499/api/ping

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:

curl -H 'Authorization: Bearer $FUTU_API_KEY' \
  http://127.0.0.1:22499/api/push-subscriber-info

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:

curl -H 'Authorization: Bearer $FUTU_API_KEY' \
  http://127.0.0.1:22499/api/user-info

Quote Subscriptions

Subscribe/unsubscribe quote push, query subscription state. Receive push via WebSocket /ws.

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 '{}' \
  http://127.0.0.1:22499/api/query-subscription

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:

curl -H 'Authorization: Bearer $FUTU_API_KEY' \
  http://127.0.0.1:22499/api/sub-info

POST /api/subscribe

proto_id: QOT_SUB (3001)

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"],"sub_types":[1]}' \
  http://127.0.0.1:22499/api/subscribe

POST /api/unsubscribe

proto_id: QOT_SUB (3001)

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"],"sub_types":[1]}' \
  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:

curl -H 'Authorization: Bearer $FUTU_API_KEY' \
  http://127.0.0.1:22499/ws

Quote Queries

Real-time quotes, K-line, order book, broker queue, time-sharing, ticker. 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 '{}' \
  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 '{}' \
  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 '{}' \
  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 '{"market":"HK","acc_id":123456,"env":"real","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.

Example:

curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
  -d '{"symbol":"HK.00700","kl_type":"day","count":100}' \
  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.

Example:

curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
  -d '{"symbol":"HK.00700","kl_type":"day","count":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 '{}' \
  http://127.0.0.1:22499/api/market-state

POST /api/orderbook

proto_id: QOT_GET_ORDER_BOOK (3012)

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 '{"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

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

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

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 '{}' \
  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.

Example:

curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
  -d '{}' \
  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 '{}' \
  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 '{}' \
  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 '{}' \
  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 '{}' \
  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 '{}' \
  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 '{}' \
  http://127.0.0.1:22499/api/trading-days

Reference / Derivatives

Warrant references, option chain, option expiration dates, future info, rehab, watchlist, holding change.

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.

Example:

curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
  -d '{}' \
  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.

Example:

curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
  -d '{}' \
  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.

Example:

curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
  -d '{}' \
  http://127.0.0.1:22499/api/holding-change

POST /api/modify-user-security

proto_id: QOT_MODIFY_USER_SECURITY (3214)

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 '{}' \
  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.

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.

Example:

curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
  -d '{}' \
  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.

Example:

curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
  -d '{}' \
  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.

Example:

curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
  -d '{}' \
  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 '{}' \
  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 '{}' \
  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.

Example:

curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
  -d '{}' \
  http://127.0.0.1:22499/api/warrant

Price Reminders

Query/set/modify/delete price reminders. Requires 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: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","op":"SetAdd","reminder_type":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 '{}' \
  http://127.0.0.1:22499/api/acc-cash-flow

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:

curl -H 'Authorization: Bearer $FUTU_API_KEY' \
  http://127.0.0.1:22499/api/accounts

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 '{}' \
  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.

Example:

curl -X POST -H 'Authorization: Bearer $FUTU_API_KEY' -H 'Content-Type: application/json' \
  -d '{"market":"HK","acc_id":123456,"env":"real"}' \
  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 '{"market":"HK","acc_id":123456,"env":"real","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 '{"market":"HK","acc_id":123456,"env":"real"}' \
  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:

curl -H 'Authorization: Bearer $FUTU_API_KEY' \
  http://127.0.0.1:22499/api/list-accounts

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 '{}' \
  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 '{}' \
  http://127.0.0.1:22499/api/max-trd-qtys

POST /api/order-fee

proto_id: TRD_GET_ORDER_FEE (2225)

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 '{}' \
  http://127.0.0.1:22499/api/order-fee

POST /api/order-fills

proto_id: TRD_GET_ORDER_FILL_LIST (2211)

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 '{}' \
  http://127.0.0.1:22499/api/order-fills

POST /api/orders

proto_id: TRD_GET_ORDER_LIST (2201)

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 '{"market":"HK","acc_id":123456,"env":"real"}' \
  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 '{"market":"HK","acc_id":123456,"env":"real"}' \
  http://127.0.0.1:22499/api/positions

POST /api/reconfirm-order

proto_id: TRD_RECONFIRM_ORDER (2237)

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 '{}' \
  http://127.0.0.1:22499/api/reconfirm-order

Trading Write

Place/modify/cancel order, cancel-all, unlock trade cipher, account push sub. Requires trade:real/trade:simulate + --enable-trading.

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 '{"acc_id":123456,"env":"simulate","market":"HK"}' \
  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 '{"market":"HK","acc_id":123456,"order_id":"987","op":"CANCEL"}' \
  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 '{"market":"HK","acc_id":123456,"env":"simulate","side":"BUY","code":"00700","qty":100,"price":300.0}' \
  http://127.0.0.1:22499/api/order

POST /api/sub-acc-push

proto_id: TRD_SUB_ACC_PUSH (2008)

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 '{}' \
  http://127.0.0.1:22499/api/sub-acc-push

POST /api/unlock-trade

proto_id: TRD_UNLOCK_TRADE (2005)

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 '{"unlock":true,"pwd_md5":"<md5-of-trade-password>"}' \
  http://127.0.0.1:22499/api/unlock-trade

POST /api/unsub-acc-push

proto_id: TRD_SUB_ACC_PUSH (2008)

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 '{}' \
  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:

curl -H 'Authorization: Bearer $FUTU_API_KEY' \
  http://127.0.0.1:22499/api/admin/status


Further reading