Max Buy/Sell Quantity
GET/api/v1.0/sim-trade/{acc_id}/max-buy-sellQuery the maximum buy/sell quantity for a security.
Parameters
| Parameter | Type | Location | Required | Description |
|---|---|---|---|---|
acc_id | string | path | Yes | Business account ID |
market | int | query | Yes | Market (from market_id in the account list) |
symbol | string | query | Yes | Security symbol |
order_type | int | query | Yes | 1=Limit 3=Market |
price | string | query | No | Price (required for limit orders) |
order_id | string | query | No | Original order ID (for modification) |
Request Example
bash
curl -s "https://webapi.moomoo.com/api/v1.0/sim-trade/80303779/max-buy-sell?market=1&symbol=00700&order_type=1&price=400" -H "Authorization: Bearer <AccessToken>" | jqResponse Fields
| Field | Type | Description |
|---|---|---|
max_cash_buy_qty_round_lot | int64 | Cash buy quantity (round lot) |
max_margin_buy_qty_round_lot | int64/null | Margin buy quantity (round lot) |
max_sell_qty_round_lot | int64 | Sell quantity (round lot) |
max_sell_short_qty | int64 | Short sell quantity |
max_buy_back_qty | int64 | Buy back quantity |
required_im_long | string/null | Futures long initial margin |
required_im_short | string/null | Futures short initial margin |
Response Example
json
{
"ret_code": 0,
"ret_msg": "success",
"data": {
"max_cash_buy_qty_round_lot": 2300,
"max_margin_buy_qty_round_lot": null,
"max_sell_qty_round_lot": 0,
"max_sell_short_qty": 0,
"max_buy_back_qty": 0,
"required_im_long": null,
"required_im_short": null
}
}Error response
HTTP status remains 200. A failed request returns ret_code != 0 and an error object.
json
{
"ret_code": -3,
"ret_msg": "invalid request",
"error": {"code": "invalid_parameter", "message": "invalid request"}
}