Skip to content

撤單

POST /api/v1.0/sim-trade/{acc_id}/orders/{order_id}/cancel

撤銷未成交的訂單。僅 status=2(已提交)的訂單可撤。

請求參數

參數類型位置必填說明
acc_idstringpath業務賬戶 ID
order_idstringpath要撤銷的訂單 ID

請求示例

bash
curl -s -X POST "https://webapi.moomoo.com/api/v1.0/sim-trade/80303779/orders/1270776/cancel" \
  -H "Content-Type: application/json" \
  -d '{}' | jq

響應字段

字段類型說明
order_idstring被撤銷的訂單 ID

響應示例

json
{
  "ret_code": 0,
  "ret_msg": "success",
  "data": {
    "order_id": "1270776"
  }
}