Skip to content

最大可買可賣 ​

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

查詢標的最大可買/可賣數量。

請求參數 ​

參數類型位置必填說明
acc_idstringpath是業務賬戶 ID
marketintquery是賬戶市場ID(賬戶列表中該賬戶的 market_id,如 1=港股 100=美股融資融券),必須與 acc_id 對應賬戶一致
symbolstringquery是證券代碼,支援 MARKET.CODE(如 US.AAPL、US.AAPL261120C275000)或不帶前綴的代碼
order_typeintquery是訂單類型:1=限價 3=市價
pricestringquery否委託價格(限價單必填;市價單可不傳)
order_idstringquery否改單時傳原單 ID

請求示例 ​

bash
curl -s "https://webapi.moomoo.com/api/v1.0/sim-trade/80306537/max-buy-sell?market=100&symbol=US.AAPL&order_type=1&price=1" -H "Authorization: Bearer <AccessToken>" | jq

響應欄位 ​

欄位類型說明
max_cash_buy_qty_round_lotstring現金可買(整手)
max_margin_buy_qty_round_lotstring/null按整手計算的現金+融資最大可買股數(非融資賬戶為 null)
max_sell_qty_round_lotstring可賣(整手)
max_sell_short_qtystring可賣空
max_buy_back_qtystring需補回
required_im_longstring/null期貨 LONG 開倉初始保證金要求(非期貨賬戶為 null)
required_im_shortstring/null期貨 SHORT 開倉初始保證金要求(非期貨賬戶為 null)

響應示例 ​

json
{
  "ret_code": 0,
  "ret_msg": "success",
  "data": {
    "max_cash_buy_qty_round_lot": "999999",
    "max_margin_buy_qty_round_lot": "1999999",
    "max_sell_qty_round_lot": "0",
    "max_sell_short_qty": "4868",
    "max_buy_back_qty": "0",
    "required_im_long": null,
    "required_im_short": null
  }
}

錯誤響應 ​

HTTP 狀態仍為 200。請求失敗時返回非 0 的 ret_code 和 error 物件。

json
{
  "ret_code": -3,
  "ret_msg": "invalid request",
  "error": {"code": "invalid_parameter", "message": "invalid request"}
}