Skip to main content

Cancel Market order

Authorization

The WebSocket connection being used must be pre-authorized with authorization request.

Alternative request

The same operation can be performed using HTTP request.

The request cancels the previously posted market order. To specify the order to be canceled, use its number in the orderid parameter.


Request

To cancel an order, send to the established WebSocket connection a message with the operation code delete:market containing the number of the order to be canceled.

{
"opcode": "delete:market",
"guid": "c328fcf1-e495-408a-a0ed-e20f95d6b813",
"orderId": "18995978560",
"exchange": "MOEX",
"user": {
"portfolio": "D39004"
},
"checkDuplicates": true
}

Responses

According to the results of processing the received request, the server will return a message with the corresponding code to the WebSocket connection.

Messages

Successful request processing report

{
"requestGuid": "c328fcf1-e495-408a-a0ed-e20f95d6b813",
"httpCode": 200,
"message": "An order '12345' has been deleted.",
"orderNumber": "12345"
}