General Info
This module documents the HK Stocks Trading REST API. Base URL, HMAC / Ed25519 signing, timestamps,
recvWindow, and the sapi error envelope are identical to other SAPI endpoint families — see the
root General Info for those.
This page lists only what is specific to the HK Stocks Trading module.
Disclaimer Prerequisite
Before placing orders, the account must sign the Hong Kong disclaimer via
POST /account/disclaimer. Signing triggers opening of the Hong Kong stock account on the broker
side. Orders placed before signing are rejected with 670410.
The Hong Kong and US disclaimers are not interchangeable: a user who has signed the US one must still sign the Hong Kong one separately.
Rate Limits
| Endpoint | Limit (per user, per minute) |
|---|---|
POST /order/place | 200 |
POST /tokenized/mint, POST /tokenized/redeem | 50 |
| Others (market incl. depth, fx, queries, cancel, cancel-all, preview, max-quantity, listenKey, wss-token) | No separate limit |
All endpoints share a global cap towards the upstream broker. When it is exceeded, SAPI returns the
standard rate-limit error -1015 (TOO_MANY_REQUESTS); it is not an upstream pass-through error.
URL Prefix
All endpoints in this module share the prefix:
Code
Symbol Format
symbolis the HKEX numeric ticker, five digits, zero-padded:00700,03968.- Internal asset codes are not exposed. Tokenized assets use their own asset code (e.g.
03968B). - Unknown tickers return
-26004/SYMBOL_NOT_EXISTS, depending on the endpoint.
Quote Asset and Currency
- Orders, fills, and prices are denominated in HKD.
- Payment and freezing use USDC (
quoteAsset, currentlyUSDConly). - The two are converted by
fxRate. See the FX Rate endpoint and/order/preview. - Amount fields are dual-denominated: no suffix = HKD,
*Quote= USDC.
Prices and Quantities
- Limit prices have at most 2 significant decimals and must match the HKEX tick table (a tiered
table that varies with price — do not treat
tickSizeas a single value). quantityis always in shares and must be an integer. Buys must be an integer multiple oflotSize.- There is no
notionalparameter.
Settlement
Hong Kong stocks settle T+2, one day later than US stocks. After a sell fills, the proceeds are recorded as unsettled and cannot be withdrawn until settlement completes.
Unsettled Balance
There is no Hong Kong-specific unsettled-balance endpoint. Use:
Code
It returns the US + Hong Kong result merged by asset, because "how much money can I not withdraw right now" is a wallet-level question, not a market-level one.
- Only non-equity assets (fiat / stablecoins) are returned;
EQ_*(incl.EQ_HK_*) are filtered out. - Returns an empty array
[], notnull, when there is nothing unsettled. - If the Hong Kong side fails to respond the whole call fails (fail closed) rather than silently returning a US-only result.
- The Hong Kong part of a USDC row is released later than the US part because of T+2.
Response example:
Code
| Field | Type | Description |
|---|---|---|
asset | STRING | Asset code, e.g. USDC |
unsettledAmount | DECIMAL | Unsettled amount of the asset (US + Hong Kong combined) |
btcValuation | DECIMAL | BTC valuation of the unsettled amount (8 decimals, HALF_UP) |
Enum Contract
- All enum string values are UPPERCASE on both request and response.
- See Common Definition for the full enum sets.
Fees
- Hong Kong statutory fees (stamp duty, trading levy, AFRC levy, trading fee, CCASS settlement fee, etc.) have steps — stamp duty is ceiled per order to whole HKD, CCASS has a minimum of 2 HKD per trade — and cannot be derived by multiplying a ratio.
- Call
/order/previewbefore placing an order;requiredPaymentQuoteis the amount actually frozen.
Return Format
Business errors are returned with HTTP 400:
Code
codeis an integer. Hong Kong endpoints return two kinds: negative numbers are common SAPI codes;670xxxare Hong Kong business codes.msgis English text intended for end users.- Several codes may share one
msg(e.g. The system is temporarily unavailable. Please try again later. for670003/670301/670404/670406/670430). Programs must branch oncode, not matchmsg.
Integration Checklist
When migrating from the US stocks SAPI, check these items one by one to avoid most pitfalls:
- Sign the disclaimer first —
/account/disclaimeris a prerequisite and triggers broker-side account opening; unsigned returns670410. clientOrderIdis at most 20 characters — not 36 as for US stocks; too long returns670453.- Market orders are not open yet —
MARKETreturns670472; use limit orders. - Do not send
notional— all Hong Kong orders are placed byquantity. - Buy quantity must be a multiple of
lotSize— check/market/exchangeInfo, or use the value returned by/order/max-quantity(already rounded). - Do not send
priceonMARKET,tradingSessionon non-LIMIT, orstopPriceon non-stop types — they error rather than being ignored. tradingSessionchooses whether to take part in the pre-opening auction —HK_AUC_CTSis the opening auction (09:00–09:30), not the closing one; the closing auction (CAS) is entered automatically by both values and is not an option. OnlyLIMITmay send it.GTCis for whole-lot limit orders only — an odd-lot order withGTCis rejected after the freeze (670463) and funds get stuck; useDAYexplicitly for odd lots.- Do not swap the two stop-order prices —
stopPricedecides when it enters,priceis the limit after entering; violations are670474–670477. - Call
/order/previewbefore placing — fees have steps and cannot be derived by a ratio. - Amounts are dual-denominated — no suffix is HKD,
*Quoteis USDC, converted byfxRate; use/fx/ratefor a pure rate lookup. fxRateis not a locked rate — the rate table has one row per day and cross-day settlement uses the settlement-day row, with the difference refunded / charged. T+2 makes cross-day the norm; do not reconcile the final debit against the placement-time rate.tokenizedefaults tofalse— US stocks default totrue; mind this when reusing code.- Odd lots have their own rules — whole lots and odd lots must be separate orders, limit only,
DAYonly. - Tokenization supports whole shares only, and the redeem fee is charged on top — use
totalAmountto confirm the actual debit. - Settlement is T+2 —
settlementDateis one day later than US, and unsettled funds take longer to release. - There is no Hong Kong unsettled-balance endpoint — use
/sapi/v1/equity/unsettled-balance, which already merges US and Hong Kong; do not look for/equity-hk/unsettled-balance(it does not exist). - Exchange a
wss-tokenbefore subscribing to market data — US market data is anonymous, Hong Kong is not (HKEX requires login); subscribing directly gets-1124. wss-tokenandlistenKeyare not interchangeable — the former subscribes to market data and is verified viaAUTHENTICATE; the latter subscribes to orders and is part of the stream name, with no verification.- Connect to the base endpoint, then
SUBSCRIBE— putting the stream name in the URL path (/equity/ws/{stream}) is rejected with a 400 at handshake, with a misleading message. expiresInis remaining seconds, not a timestamp — treating it as absolute pushes renewal decades away and the market stream silently drops.- L2 depth is open to CN entities only — non-CN subscribing to
@depth_10@hkgets-1125, while L1 (quote / price / kline) works as usual; do not read it as an invalid credential. - Filter pushes by
assetClass— Hong Kong ishk_equity; without filtering, US events mix in. 670301does not mean the order failed — retry with the sameclientOrderId; do not replace it with a new ID.- The L2 depth snapshot needs whitelisting first —
/market/depthis closed by default; the caller UID (the sub-account UID for a sub-account key) must be configured by Binance, otherwise-99020.