Skip to content

Cancel Order

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

Cancel an unfilled order. Only orders with status=2 (Submitted) can be cancelled.

Parameters

ParameterTypeLocationRequiredDescription
acc_idstringpathYesBusiness account ID
order_idstringpathYesOrder ID to cancel

Request Example

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

Response Fields

FieldTypeDescription
order_idstringCancelled order ID

Response Example

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