Naming Dictionary
Enumeration and data structure reference for all trading APIs. All enum fields and response structures in the API documentation can be found here.
trd_side (Trading Direction)
| Value | Description |
|---|---|
| NONE | Unknown direction |
| BUY | Buy |
| SELL | Sell |
| SELL_SHORT | Sell short |
| BUY_BACK | Buy back |
order_type (Order Type)
| Value | Description |
|---|---|
| NONE | Unknown type |
| LIMIT | Limit orders |
| MARKET | Market orders |
| AUCTION | At-auction market orders |
| AUCTION_LIMIT | At-auction limit orders |
| STOP | Stop orders |
| STOP_LIMIT | Stop Limit orders |
| MARKET_IF_TOUCHED | Market if Touched orders |
| LIMIT_IF_TOUCHED | Limit if Touched orders |
order_status (Order Status)
| Value | Description |
|---|---|
| NONE | Unknown status |
| WAITING_SUBMIT | Waiting to submit |
| SUBMITTING | Submitting |
| SUBMITTED | Pending |
| FILLED_PART | Partially filled, unfilled part not cancelled |
| FILLED_ALL | All filled |
| CANCELLED_PART | Partially filled, remaining cancelled |
| CANCELLED_ALL | All cancelled, no transactions |
| FAILED | Order failed, refused by server |
| DISABLED | Order disabled |
| DELETED | Deleted, only unfilled orders can be deleted |
trd_market (Trading Market)
| Value | Description |
|---|---|
| NONE | Unknown market |
| HK | Hong Kong market |
| US | US market |
| SG | Singapore market |
| HKCC | HKCC market |
| CA | Canada market |
| FUTURES | Futures market |
exchange (Exchange)
| Value | Description |
|---|---|
| US | US Market |
| SEHK | Hong Kong Stock Exchange |
| SGX | Singapore Exchange |
| SSE | Shanghai Stock Exchange (Shanghai-Hong Kong Stock Connect) |
| SZSE | Shenzhen Stock Exchange (Shenzhen-Hong Kong Stock Connect) |
| JP | Japan Exchange |
| CA | Canada Exchange |
| CME | Chicago Mercantile Exchange |
| CBOT | Chicago Board of Trade |
| NYMEX | New York Mercantile Exchange |
| COMEX | Commodity Exchange |
| CBOE | Chicago Board Options Exchange |
| HKFE | Hong Kong Futures Exchange |
trading_session (Trading Session)
| Value | Description |
|---|---|
| NONE | Unknown |
| RTH | Regular trading hours |
| RTH+Pre/Post-Mkt | RTH + Pre/Post-Market |
| OVERNIGHT | Only night trading |
| ALL_DAY | All-day trading |
Only applicable to US stocks. Market orders only support RTH.
time_in_force (Time in Force)
| Value | Description |
|---|---|
| NONE | Unknown |
| DAY | Day order |
| GTC | Good till cancelled |
order_class (Order Class)
| Value | Description |
|---|---|
| NORMAL | Normal single-leg order (default) |
| MLEG | Multi-leg order |
lot_type (Lot Type)
| Value | Description |
|---|---|
| ODD | Odd lot |
| ROUND | Round lot (default) |
Only applicable to Hong Kong stocks.
currency (Currency)
| Value | Description |
|---|---|
| NONE | Unknown |
| HKD | Hong Kong Dollar |
| USD | US Dollar |
| CNH | Offshore RMB |
| JPY | Japanese Yen |
| SGD | Singapore Dollar |
trail_type (Trailing Type)
| Value | Description |
|---|---|
| NONE | Unknown |
| RATIO | Trailing ratio |
| AMOUNT | Trailing amount |
deal_status (Deal Status)
| Value | Description |
|---|---|
| OK | Normal |
| CANCELLED | Transaction cancelled |
| CHANGED | Transaction changed |
security_type (Security Type)
| Value | Description |
|---|---|
| STOCK | Stock |
| OPTION | Option |
| FUTURES | Future |
| MULTILEG_OPTION | Multi-leg option |
position_side (Position Side)
| Value | Description |
|---|---|
| NONE | Unknown |
| LONG | Long position (default) |
| SHORT | Short position |
clt_risk_status (Risk Status)
| Value | Description |
|---|---|
| NONE | Unknown |
| LEVEL1 | Very Safe |
| LEVEL2 | Safe |
| LEVEL3 | Safe |
| LEVEL4 | Low Risk |
| LEVEL5 | Medium Risk |
| LEVEL6 | High Risk |
| LEVEL7 | Warning |
| LEVEL8 | Margin Call |
| LEVEL9 | Margin Call |
enable_market (Supported Trading Market)
Used in the Get Authorized Trading Accounts response.
| Value | Description |
|---|---|
| 1 | Hong Kong Market |
| 2 | US Market |
| 4 | HKCC Market |
| 5 | Futures |
| 6 | Singapore Market |
| 7 | Crypto |
| 8 | Australia Market |
| 9 | Forex |
| 10 | Bond |
| 11 | Malaysia Market |
| 12 | Canada Market |
| 14 | Fund |
| 15 | Japan Market |
| 16 | Structured Notes |
| 17 | Event Contracts |
security_firm (Security Firm)
Used in the Get Authorized Trading Accounts response.
| Value | Description |
|---|---|
| FUTUSECURITIES | Futu Securities (Hong Kong) |
| FUTUSG | moomoo (Singapore) |
| FUTUINC | moomoo (US) |
| FUTUCA | moomoo (Canada) |
option_strategy (Option Strategy)
Used in the multi_leg_info.option_strategy field for multi-leg orders.
| Value | Description |
|---|---|
| Covered | Covered |
| VerticalSpread | Vertical Spread |
| Straddle | Straddle |
| Strangle | Strangle |
| Collar | Collar |
| Butterfly | Butterfly |
| Condor | Condor |
| IronButterfly | Iron Butterfly |
| IronCondor | Iron Condor |
| CalenderSpread | Calendar Spread |
| DiagonalSpread | Diagonal Spread |
| Customize | Customize |
Account
Account object returned by the Get Authorized Trading Accounts endpoint.
| Field | Type | Description |
|---|---|---|
account_id | string | Trading business account ID |
security_firm | SecurityFirm | Security firm info |
enable_market | list[int] | Supported trading markets. See enable_market |
univs_account_card_number | string | Universal account card number (16 digits) |
acc_type | string | Account type: cash / margin |
account_card_number | string | Business account card number (16 digits) |
Order
Order object returned by order query APIs.
| Field | Type | Description |
|---|---|---|
side | TrdSide | Trading direction |
order_type | OrderType | Order type |
order_status | OrderStatus | Order status |
order_id | string | Order ID |
code | string | Security code |
stock_name | string | Security name |
security_type | SecurityType | Instrument type |
qty | string | Order quantity |
price | string | Order price |
currency | Currency | Transaction currency |
create_time | uint64 | Create time |
updated_time | uint64 | Last update time |
dealt_qty | string | Deal quantity |
dealt_avg_price | string | Average deal price |
last_err_msg | string | Last error description |
remark | string | Remark set when placing order |
time_in_force | TimeInForce | Time in force |
session | TradingSession | Trading session |
aux_price | string | Trigger price |
trail_type | TrailType | Trailing type |
trail_value | string | Trailing amount/ratio. Negative when TrdSide is SELL or SELL_SHORT. |
trail_spread | string | Specify spread. Negative when TrdSide is SELL or SELL_SHORT. |
multi_leg_info | list[MultiLegInfo] | Multi-leg order info |
OrderFill
Fill object returned by deal query APIs.
| Field | Type | Description |
|---|---|---|
trd_side | TrdSide | Trade direction |
deal_id | string | Fill identifier. Base58-encoded, up to 32 characters. Case-sensitive. |
order_id | string | Order identifier |
code | string | Stock code |
stock_name | string | Stock name |
qty | string | Fill quantity |
price | string | Fill price |
create_time | uint64 | Creation time |
updated_time | uint64 | Last update time |
counter_broker_id | int | Counterparty broker number |
counter_broker_name | string | Counterparty broker name |
status | DealStatus | Fill status |
MultiLegInfo
Multi-leg order details used in place order requests and order responses.
| Field | Type | Required | Description |
|---|---|---|---|
option_strategy | OptionStrategy | Yes | Multi-leg option strategy type |
underlying_symbol | string | Yes | Underlying stock symbol, e.g. AAPL |
underlying_stock_name | string | No | Underlying stock name (response only) |
leg_infos | list[OrderLegInfo] | Yes | Information of each leg |
OrderLegInfo
Detailed information for each leg in a multi-leg order.
| Field | Type | Required | Description |
|---|---|---|---|
leg_symbol | string | Yes | Specific leg symbol |
leg_exchange | Exchange | Yes | Exchange corresponding to leg symbol |
leg_ratio_qty | string | Yes | Ratio quantity determined by greatest common factor |
leg_side | TrdSide | Yes | Direction of each leg |
leg_security_type | SecurityType | Yes | Security type of leg |
leg_stock_name | string | No | Leg stock name (response only) |
leg_hp_multiplier | string | No | Leg contract multiplier (response only) |
leg_avg_fill_price | string | No | Average fill price of each leg (response only) |