Skip to Content

Estimate Maximum Purchase Quantity

This API is used for estimating the maximum purchase quantity for Hong Kong and US stocks, warrants, and options.

CLI
longbridge max-qty TSLA.US

Request

HTTP MethodGET
HTTP URL/v1/trade/estimate/buy_limit

Parameters

Content-Type: application/json; charset=utf-8

NameTypeRequiredDescription
symbolstringYESStock code, using ticker.region format, for example: AAPL.US
order_typestringYESOrder Type
pricestringNOEstimated order price, for example: 388.5
sidestringYESOrder side

Enum Value
Buy - Buy
Sell - Sell (Short selling is only supported for US stocks)
currencystringNOSettlement currency
order_idstringNOOrder ID, required when estimating the maximum purchase quantity for a modified order

Request Example

Response

Response Headers

  • Content-Type: application/json

Response Example

json
{
  "code": 0,
  "message": "success",
  "data": {
    "cash_max_qty": "100",
    "margin_max_qty": "100"
  }
}

Response Status

StatusDescriptionSchema
200Estimate Maximum Purchase Quantity Successestimate_available_buy_limit_rsp
400The query failed with an error in the request parameter.None

Schemas

estimate_available_buy_limit_rsp

Estimated Maximum Purchase Quantity

NameTypeRequiredDescription
cash_max_qtystringtrueCash available quantity, default value is empty string.
margin_max_qtystringtrueMargin available quantity, default value is empty string.