最大可買可賣
GET/api/v1.0/sim-trade/{acc_id}/max-buy-sell查詢標的最大可買/可賣數量。
請求參數
| 參數 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
acc_id | string | path | 是 | 業務賬戶 ID |
market | int | query | 是 | 市場(來自賬戶列表的 market_id) |
symbol | string | query | 是 | 證券代碼 |
order_type | int | query | 是 | 1=限價 3=市價 |
price | string | query | 否 | 價格(限價必填) |
order_id | string | query | 否 | 改單時傳原單 ID |
請求示例
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響應欄位
| 欄位 | 類型 | 說明 |
|---|---|---|
max_cash_buy_qty_round_lot | int64 | 現金可買(整手) |
max_margin_buy_qty_round_lot | int64/null | 融資可買(整手) |
max_sell_qty_round_lot | int64 | 可賣(整手) |
max_sell_short_qty | int64 | 可賣空 |
max_buy_back_qty | int64 | 需補回 |
required_im_long | string/null | 期貨多開保證金 |
required_im_short | string/null | 期貨空開保證金 |
響應示例
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
}
}錯誤響應
HTTP 狀態仍為 200。請求失敗時返回非 0 的 ret_code 和 error 物件。
json
{
"ret_code": -3,
"ret_msg": "invalid request",
"error": {"code": "invalid_parameter", "message": "invalid request"}
}