Cancel Stop Limit order
The WebSocket connection being used must be pre-authorized with authorization request.
This operation can be performed with request to HTTP API.
The request cancels the previously posted stop limit 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:stopLimit
containing the number of the order to be canceled.
- Request body
- Schema
{
"opcode": "delete:stopLimit",
"guid": "c328fcf1-e495-408a-a0ed-e20f95d6b813",
"orderId": "18995978560",
"exchange": "MOEX",
"user": {
"portfolio": "D39004"
},
"checkDuplicates": true
}
Request body parameters
authorize
— Authorization of WebSocket connectioncreate:market
— Creation of market ordercreate:limit
— Creation of limit ordercreate:stop
— Creation of stop ordercreate:stopLimit
— Creation of stop limit orderupdate:market
— Modification of market orderupdate:limit
— Modification of limit orderupdate:stop
— Modification of stop orderupdate:stopLimit
— Modification of stop limit orderdelete:market
— Cancelation of market orderdelete:limit
— Cancelation of limit orderdelete:stop
— Cancelation of stop orderdelete:stopLimit
— Cancelation of stop limit orderbuy
sell
MOEX
— Moscow ExchangeSPBX
— SPB Exchange
Operation code:
The unique identifier of the operation. All incoming messages related to this operation will have this guid
field value
Example: c328fcf1-e495-408a-a0ed-e20f95d6b813
Transaction side:
Example: buy
Exchange code:
Example: MOEX
user
object
User data
Client portfolio ID
Example: D39004
Flag for checking the uniqueness of commands. It is enabled by default, preventing spamming with similar commands. When disabled, speeds up request processing.
Example: 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.
- 200
- 400
Successful request processing report
- Body
- Schema
{
"requestGuid": "c328fcf1-e495-408a-a0ed-e20f95d6b813",
"httpCode": 200,
"message": "An order '12345' has been deleted.",
"orderNumber": "12345"
}
Response body parameters
The unique identifier of the operation. All incoming messages related to this operation will have this guid
field value
Example: c328fcf1-e495-408a-a0ed-e20f95d6b813
Response HTTP code
Example: 200
Text description of the returned HTTP code
Example: An order '12345' has been deleted.
Unique order ID
Example: "12346"
Failed to process the request. Check the validity of the transmitted message and try again.
- Body
- Schema
{
"requestGuid": "c328fcf1-e495-408a-a0ed-e20f95d6b813",
"httpCode": 400,
"message": "Invalid or unsupported quantity"
}
Response body parameters
The unique identifier of the operation. All incoming messages related to this operation will have this guid
field value
Example: c328fcf1-e495-408a-a0ed-e20f95d6b813
Response HTTP code
Example: 400
Text description of the returned HTTP code
Example: Invalid or unsupported quantity