Errors on HK Stocks Trading endpoints come in two kinds: negative numbers are common SAPI codes, and
670xxx are Hong Kong business codes. Pre-check (SAPI) errors take precedence: signature,
timestamp, parameters and format are validated before the request reaches the equity service.
All business errors are returned with HTTP 400 in the standard SAPI envelope — the code is in code
and the English message in msg. Programs must branch on code, not match msg: several codes
share the same msg (for example The system is temporarily unavailable. Please try again later.
for 670003 / 670301 / 670404 / 670406 / 670430).
Code
{ "code": 670418, "msg": "Order quantity must be a multiple of the minimum lot size."}
Common SAPI Error Codes
code
msg
Trigger
-1102
Mandatory parameter 'xxx' was not sent, was empty/null, or malformed.
A parameter is missing or malformed; the quoted text is the parameter name. E.g. a limit order missing price / tradingSession, a stop order missing stopPrice, price over 2 significant decimals, or an invalid side / orderType.
-1106
Parameter 'xxx' sent when not required.
A parameter was sent that must not be: price on MARKET, tradingSession on non-LIMIT, stopPrice on non-stop types, MARKET with GTC.
-1107
A parameter's value was beyond range.
More than 100 tickers in one market/quote request.
-2013
Order does not exist.
Order Detail: the order does not exist, does not belong to the caller, or orderId and clientOrderId do not match.
-1015
Too many requests.
Rate limit exceeded (see Rate Limits).
-26004
Symbol [xxx] is not exists
Ticker is not listed or misspelled.
-99020
Not a valid whitelisted user id.
The caller is not on the whitelist (e.g. L2 depth snapshot).
-3044
System busy.
Fetching the preview before placing an order failed, so the freeze amount is unknown. Retry later.
Hong Kong Business Error Codes
Order Parameters and Trading Rules
code
msg
Trigger
670418
Order quantity must be a multiple of the minimum lot size.
Buy quantity is not a whole-lot multiple.
670452
Limit price must match the HKEX tick size for its price tier.
Limit price does not match the HKEX tiered tick table.
670416 / 670417
Order quantity is below the minimum. / exceeds the maximum.
Quantity is out of range.
670419 / 670420
Order amount is below the minimum. / exceeds the maximum.
Amount is out of range.
670421 / 670422
Limit price is above / below the allowed range.
Limit price is outside the allowed price-limit range.
670455
Order quantity exceeds the maximum lots allowed per order.
Exceeds the maximum lots per order.
670423
You have reached the maximum number of open orders.
Open-order count has reached the cap.
670453
clientOrderId is too long. Please use at most 20 characters.
clientOrderId is longer than 20 characters.
670449
Duplicate clientOrderId. Please use a new clientOrderId and try again.
clientOrderId is a duplicate and the original order has failed.
670201
This quote asset is not supported.
quoteAsset is not allowed (only USDC for now).
Market Orders and Trading Sessions
code
msg
Trigger
670472
Market orders are not supported yet. Please place a limit order instead.
Market orders are not open yet; use a limit order.
670454
Market orders are only accepted during continuous trading hours (09:30-12:00, 13:00-16:00 HKT).
Market orders are only accepted in the two continuous-trading sessions.
670460
The exchange does not accept new orders during this auction phase.
New orders are not accepted during this auction phase; retry after the auction ends.
670465
(closing-auction price band)
A limit order placed during the closing auction (16:00–16:10) with a price more than 5 percentage points above or below the reference price. This is judged by the market phase at placement time and is unrelated to the tradingSession parameter.
About 670465: the reference price used by the server is an approximation (the exchange's CAS
reference price is the median of five snapshots between 15:59 and 16:00, while the server only has a
single current price), so near the boundary the two sides may judge differently; the broker's ruling
prevails. When no market price is available, the check degrades to pass and hands the ruling back to
the broker.
Odd Lots
Odd-lot rules are the easiest to trip over: whole lots and odd lots are two separate markets at the
exchange.
code
msg
Trigger
670458
Whole lots and odd lots must be sold as two separate orders.
The sell quantity mixes whole lots and odd lots; split into two orders.
670459
Odd lot orders can only be placed as limit orders.
Odd-lot orders must be limit orders.
670463
Odd lot orders only support Day time-in-force.
An odd-lot sell with GTC; use DAY explicitly.
670473
Proceeds from this odd-lot sale cannot cover the fees.
Proceeds of the odd-lot sale cannot cover the fees.
Stop-Limit Orders
code
msg
Trigger
670474
Limit price must be greater than or equal to the stop price.
BUY stop: price is below stopPrice.
670475
Limit price must be less than or equal to the stop price.
SELL stop: price is above stopPrice.
670476
Stop price must be greater than the last price.
BUY stop: stopPrice is not above the last price.
670477
Stop price must be less than the last price.
SELL stop: stopPrice is not below the last price.
Account and Eligibility
code
msg
Trigger
670410
Please sign the trading disclaimer before placing an order.
The Hong Kong disclaimer is not signed; call /account/disclaimer first.
670479
Stock trading is not open to your account yet.
The account is not on the order whitelist.
670213 / 670215
Stock trading account not found. / Your account is not active.
The broker account does not exist or is not active.
670219
Account creation is in progress. Please try again later.
Account opening is in progress; retry later.
670438
Your account is not authorized for trading.
The account has no trading permission.
670439
Your account is currently restricted to sell-only.
The account is restricted to selling only.
670105
Account not found.
The funding account does not exist.
Funds and Fills
code
msg
Trigger
670405
Insufficient balance. Please deposit and try again.
Insufficient balance.
670437
Insufficient shares available. Please check your holdings.
Insufficient holdings when selling.
670457
Payment amount is far above the required amount. Please retry.
The payment amount is far above what is required, usually because the caller got the order of magnitude wrong.
670424
Order amount is too small after fees.
The order amount is too small after fees.
670207 / 670428
This stock is currently unavailable for trading. / Trading is currently suspended.
The symbol is suspended or not tradable.
670426 / 670427
Buy / Sell orders are not allowed for this stock.
This direction is forbidden for the symbol.
Cancel
code
msg
Trigger
670444
Order not found or already filled. Unable to cancel.
The order does not exist or is already filled.
670412
This order cannot be canceled.
The order is in a non-cancelable state.
670411
Unable to cancel the order. Please try again later.
Cancel failed; may be retried.
System (Retryable)
code
msg
Trigger
670301
The system is temporarily unavailable. Please try again later.
Broker-side call failed. When placing an order, the order may still be processing and has not necessarily failed — retry with the same clientOrderId, or query Order Detail by clientOrderId for the final state.
670430 / 670003 / 670404 / 670406
Same as above
System busy, fee-rate lookup failed, etc.; retry later.
670302
Market price unavailable, please try again later
The market price is temporarily unavailable.
670464
Order rejected by broker: the order parameters are not acceptable.
Rejected by the broker and retrying will not help; check the parameters.
Tokenization (mint / redeem)
code
msg
Trigger
670710
Whole shares only for mint / redeem
The quantity has a decimal part.
670702
Insufficient balance
On mint, not enough shares; on redeem, Spot bStock is below redeem amount plus fee.
670703 / 670704
Invalid tokenized asset / does not match the underlying
The asset is not whitelisted or the pair is wrong.
670719
Tokenization conversion is not enabled
The asset does not have the convert / enable flags on.
670712
Transfer failed; bStock refunded in full (fee included)
Redeem failed and was refunded.
670430
System busy
status is still P; it recovers automatically in the background. Not a failure — keep polling.