Skip to content

Max Buy/Sell Quantity ​

GET /api/v1.0/sim-trade/{acc_id}/max-buy-sell

Query the maximum buy/sell quantity for a security.

Parameters ​

ParameterTypeLocationRequiredDescription
acc_idstringpathYesBusiness account ID
marketintqueryYesMarket (from market_id in the account list)
symbolstringqueryYesSecurity symbol
order_typeintqueryYes1=Limit 3=Market
pricestringqueryNoPrice (required for limit orders)
order_idstringqueryNoOriginal 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>" | jq

Response Fields ​

FieldTypeDescription
max_cash_buy_qty_round_lotint64Cash buy quantity (round lot)
max_margin_buy_qty_round_lotint64/nullMargin buy quantity (round lot)
max_sell_qty_round_lotint64Sell quantity (round lot)
max_sell_short_qtyint64Short sell quantity
max_buy_back_qtyint64Buy back quantity
required_im_longstring/nullFutures long initial margin
required_im_shortstring/nullFutures 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"}
}