Skip to main content

Margin Account Cancel Order (TRADE)

API Description

Cancel an active order for margin account.

HTTP Request

DELETE /sapi/v1/margin/order

Request Weight

10(IP)

Request Parameters

NameTypeMandatoryDescription
symbolSTRINGYES
isIsolatedSTRINGNOfor isolated margin or not, "TRUE", "FALSE",default "FALSE"
orderIdLONGNO
origClientOrderIdSTRINGNO
newClientOrderIdSTRINGNOUsed to uniquely identify this cancel. Automatically generated by default.
recvWindowLONGNOThe value cannot be greater than 60000
timestampLONGYES
  • Either orderId or origClientOrderId must be sent.

Response Example

{
"symbol": "LTCBTC",
"isIsolated": true, // if isolated margin
"orderId": "28",
"origClientOrderId": "myOrder1",
"clientOrderId": "cancelMyOrder1",
"price": "1.00000000",
"origQty": "10.00000000",
"executedQty": "8.00000000",
"cummulativeQuoteQty": "8.00000000",
"status": "CANCELED",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "SELL"
}

Error Code Description:

  • CANCEL_REJECTED

    This error {“code”: -2011, “msg”: “Unknown order sent.”} occurs when the order (by either orderId, clientOrderId, origClientOrderId) could not be found in the matching engine. It often results from your attempt to cancel an order that has already been processed. You can review all orders(GET /sapi/v1/margin/allOrders) to confirm the status of the order.