Skip to main content

Cancel Margin Account OCO Orders(TRADE)

API Description#

Cancel Margin Account OCO Orders

HTTP Request#

DELETE /papi/v1/margin/orderList

Request Weight#

2

Request Parameters#

NameTypeMandatoryDescription
symbolSTRINGYES
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",  "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"    },    {      "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"    }  ]}