Skip to main content

Create Stop 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.

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 ensure the exchange order being placed using order estimation request.

The request creates a stop order with the parameters defined in the message body for the specified portfolio.


Request

To create an order, send a message to the established WebSocket connection with the operation code create:stop containing the details of this order.

{
"opcode": "create:stop",
"guid": "c328fcf1-e495-408a-a0ed-e20f95d6b813",
"side": "buy",
"quantity": 300,
"condition": "LessOrEqual",
"triggerPrice": 191.33,
"stopEndUnixTime": 1590094740,
"instrument": {
"symbol": "SBER",
"exchange": "MOEX",
"instrumentGroup": "TQBR"
},
"user": {
"portfolio": "D39004"
},
"allowMargin": false,
"checkDuplicates": true,
"protectingSeconds": 15,
"comment": "First order",
"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.

Messages

Successful request processing report

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