Skip to main content

Update Stop order

Private resource

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

HTTP API

This operation can be performed with request to HTTP API.

Collateral

Conditional orders do not require collateral, but limit and market orders placed by them do. Ensure that at the time the conditional order is triggered, there will be sufficient funds in the portfolio to cover the exchange order being placed by using order estimation request.

The request creates a new stop order with changed characteristics, automatically canceling the previously created one. To specify the order to be canceled, use its number in the orderid parameter.


Request

To modify an order, send a message to the established WebSocket connection with the operation code update:stop containing the new order details.

{
"opcode": "update:stop",
"guid": "c328fcf1-e495-408a-a0ed-e20f95d6b813",
"orderId": "18995978560",
"side": "buy",
"quantity": 300,
"condition": "More",
"triggerPrice": 191.33,
"stopEndUnixTime": 1590094740,
"instrument": {
"symbol": "SBER",
"exchange": "MOEX"
},
"board": "TQBR",
"user": {
"portfolio": "D39004"
},
"checkDuplicates": true,
"protectingSeconds": 15,
"activate": 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.

Successful request processing report

{
"requestGuid": "c328fcf1-e495-408a-a0ed-e20f95d6b813",
"httpCode": 200,
"message": "An order has been updated. New order ID is '12346'.",
"orderNumber": "12346"
}