Trading

Cancel orders (batch)

Cancels up to 20 of the user's orders in one message.

WSSwss://ws.bit2me.com/v1/tradingcancel-orders

Cancelled orders are listed in ordersDeleted, and the rest in ordersNotDeletedReasons with the reason.

Batch order cancellation request.

event*string
Valuecancel-orders
ordersId*string[]
Items1 <= items <= 20
{  "event": "cancel-orders",  "ordersId": ["cab25117-47ce-4991-98d3-3a334afbc6a0", "a00ea616-aed4-44eb-9e05-b55c475e39d9"]}
{  "event": "canceled-orders",  "data": {    "userId": "2bf436fc-43e6-459a-b647-6b446f72ad96",    "ordersDeleted": [      {        "id": "cab25117-47ce-4991-98d3-3a334afbc6a0",        "status": "cancelled"      }    ],    "ordersNotDeletedReasons": [      {        "id": "a00ea616-aed4-44eb-9e05-b55c475e39d9",        "reason": "The order with ID a00ea616-aed4-44eb-9e05-b55c475e39d9 was not found",        "error": {          "code": "ORDER_NOT_FOUND",          "message": "The order with ID a00ea616-aed4-44eb-9e05-b55c475e39d9 was not found"        }      }    ]  }}