Query Max Tradable Quantity
GET/api/v1.0/accounts/{acc_id}/acctradinginfoQuery the maximum quantity that can be bought or sold under a specific trading account, and you can also query the maximum changeable quantity of a specific order.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
acc_id | string | Yes | Trading business account ID. |
Request Parameters
| Parameter | Type | Position | Required | Description |
|---|---|---|---|---|
code | string | Query | Yes | Symbol code. Format: exchange.symbol, e.g. US.AAPL |
price | string | Query | No | Price of a non-market order. For securities accounts, accurate to 3 decimal places. For futures accounts, accurate to 9 decimal places. Excess will be discarded. |
order_type | string | Query | Yes | Order type. See Naming Dictionary |
order_id | string | Query | No | Order ID. By default, using empty string to query the maximum available quantity for new orders. If an order needs modifying, the order_id needs to be transmitted. If you use this parameter to query the maximum quantity, you need to call this interface again after placing an order, with an interval of more than 0.5 seconds. |
Response Parameters
| Field | Type | Description |
|---|---|---|
max_cash_buy | string | Buy on cash |
max_cash_and_margin_buy | string | Buy on margin |
max_position_sell | string | Sell on position |
max_sell_short | string | Short sell |
max_buy_back | string | Short positions |
long_required_im | string | Initial margin change when buying one contract of an asset |
short_required_im | string | Initial margin change when selling one contract of an asset |
Response Example
json
{
"s": "ok",
"d": {
"max_cash_buy": "100",
"max_cash_and_margin_buy": "200",
"max_position_sell": "50",
"max_sell_short": "0",
"max_buy_back": "0",
"long_required_im": "1800.000000000",
"short_required_im": "0.000000000"
}
}Error Response:
json
{
"s": "error",
"errcode": -1200,
"errmsg": "Error message."
}