Skip to main content

Margin Account Cancel OCO (TRADE)

API Description#

Cancel an entire Order List for a margin account.

HTTP Request#

DELETE /sapi/v1/margin/orderList

Request Weight#

1(UID)

Request Parameters#

NameTypeMandatoryDescription
symbolSTRINGYES
isIsolatedSTRINGNOfor isolated margin or not, "TRUE", "FALSE",default "FALSE"
orderListIdLONGNOEither orderListId or listClientOrderId must be provided
listClientOrderIdSTRINGNOEither orderListId or listClientOrderId must be provided
newClientOrderIdSTRINGNOUsed to uniquely identify this cancel. Automatically generated by default
recvWindowLONGNOThe value cannot be greater than 60000
timestampLONGYES

Additional notes:

  • Canceling an individual leg will cancel the entire OCO

Response Example#

{  "orderListId": 0,  "contingencyType": "OCO",  "listStatusType": "ALL_DONE",  "listOrderStatus": "ALL_DONE",  "listClientOrderId": "C3wyj4WVEktd7u9aVBRXcN",  "transactionTime": 1574040868128,  "symbol": "LTCBTC",  "isIsolated": false,       // if isolated margin  "orders": [    {      "symbol": "LTCBTC",      "orderId": 2,      "clientOrderId": "pO9ufTiFGg3nw2fOdgeOXa"    },    {      "symbol": "LTCBTC",      "orderId": 3,      "clientOrderId": "TXOvglzXuaubXAaENpaRCB"    }  ],  "orderReports": [    {      "symbol": "LTCBTC",      "origClientOrderId": "pO9ufTiFGg3nw2fOdgeOXa",      "orderId": 2,      "orderListId": 0,      "clientOrderId": "unfWT8ig8i0uj6lPuYLez6",      "price": "1.00000000",      "origQty": "10.00000000",      "executedQty": "0.00000000",      "cummulativeQuoteQty": "0.00000000",      "status": "CANCELED",      "timeInForce": "GTC",      "type": "STOP_LOSS_LIMIT",      "side": "SELL",      "stopPrice": "1.00000000",      "selfTradePreventionMode": "NONE"    },    {      "symbol": "LTCBTC",      "origClientOrderId": "TXOvglzXuaubXAaENpaRCB",      "orderId": 3,      "orderListId": 0,      "clientOrderId": "unfWT8ig8i0uj6lPuYLez6",      "price": "3.00000000",      "origQty": "10.00000000",      "executedQty": "0.00000000",      "cummulativeQuoteQty": "0.00000000",      "status": "CANCELED",      "timeInForce": "GTC",      "type": "LIMIT_MAKER",      "side": "SELL",      "selfTradePreventionMode": "NONE"    }  ]}