Update Limit 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.
Exchange restrictions
Due to restriction imposed by the Exchange, the parameters side
and symbol
will not be included in the change of orders related to the derivatives market. The restriction does not apply to initial placing of derivatives orders and change of orders at other markets.
The request creates a new limit 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:limit
containing the new order details.
- Request body
- Schema
{
"opcode": "update:limit",
"guid": "c328fcf1-e495-408a-a0ed-e20f95d6b813",
"orderId": "18995978560",
"side": "buy",
"quantity": 300,
"price": 142.52,
"instrument": {
"symbol": "SBER",
"exchange": "MOEX",
"instrumentGroup": "TQBR"
},
"comment": "First order",
"user": {
"portfolio": "D39004"
},
"allowMargin": false,
"icebergFixed": 100,
"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
buy
sell
MOEX
— Moscow ExchangeSPBX
— SPB Exchange- List of Moscow Exchange codes is available in table
- SPB Exchange securities always have
SPBX
code
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
Transaction side:
Example: buy
Number of lots
Example: 300
Price
Example: 142.52
instrument
object
Security data
Security code (Ticker)
Example: SBER
Exchange code:
Example: MOEX
Trading mode code (Board):
Example: TQBR
Custom order comment. Maximum comment length is limited by 100 characters
Example: First order
user
object
User data
Client portfolio ID
Example: D39004
A flag that confirms that the Initial Risk Level Customer (IRLC) agrees to submit an order with a potentially uncovered position.
Must be true
to place a margin position order on behalf of the IRLC. Otherwise the server will return an error stating that there is no confirmation of consent to open a margin position.n The flag is ignored in the derivatives market and for other risk level clients.
Example: false
The visible constant part of the iceberg order in lots. Must be filled at the order creation, can be changed later but only for orders created on stock and money markets
Example: 100
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.
Messages
- 200
- 400
Successful request processing report
- Body
- Schema
{
"requestGuid": "c328fcf1-e495-408a-a0ed-e20f95d6b813",
"httpCode": 200,
"message": "An order has been updated. New order ID is '12346'.",
"orderNumber": "12346"
}
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 has been updated. New order ID is '12346'.
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