Trade
Authorization
Signed mode: every request is signed with your App Key/Secret. Header set:
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string · header | Required | The account Access Token from the OpenAPI dashboard — passed as the raw token (no Bearer prefix) and included in the signature calculation. |
X-Api-Key | string · header | Required | Your App Key. |
X-Timestamp | string · header | Required | Request timestamp in seconds (Unix epoch). |
X-Api-Signature | string · header | Required | HMAC-SHA256 signature. Format: HMAC-SHA256 SignedHeaders=authorization;x-api-key;x-timestamp, Signature=. |
This API is used for estimating the maximum purchase quantity for Hong Kong and US stocks, warrants, and options.
Request
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
symbol | string | Required | Stock code, using ticker.region format, for example: `AAPL.US` |
order_type | string | Required | Order Type. One of: `LO`, `ELO`, `MO`, `AO`, `ALO`, `ODD`, `LIT`, `MIT`, `TSLPAMT`, `TSLPPCT`, `SLO`. |
price | string | Optional | Estimated order price, for example: `388.5` |
side | string | Required | Order side. **Enum Value**, `Buy` - Buy, `Sell` - Sell (Short selling is only supported for US stocks) |
currency | string | Optional | Settlement currency |
order_id | string | Optional | Order ID, required when estimating the maximum purchase quantity for a modified order |
Response
Response properties
| Name | Type | Required | Description |
|---|---|---|---|
cash_max_qty | string | Required | Cash available quantity, default value is empty string. |
margin_max_qty | string | Required | Margin available quantity, default value is empty string. |
Response JSON example
{
"code": 0,
"message": "success",
"data": {
"cash_max_qty": "100",
"margin_max_qty": "100"
}
}Error code
See the Error Codes page for the full list of error codes.