ModifyOrder
Category: User Permissions: Operator, Trading Call Type: Synchronous
Reduces an order’s quantity without losing priority in the order book. An order’s quantity can only be reduced. The other call that can modify an order — CancelReplaceOrder — resets order book priority, but you can use it to increase an order.
Note: ModifyOrder does not surrender or reset order book priority.
Request
Key | Value |
---|---|
OMSId | integer. The ID of the Order Management System where the original order was placed. |
OrderId | long integer. The ID of the order to be modified. The ID was supplied by the server when the order was created. |
InstrumentId | integer. The ID of the instrument traded in the order. |
PreviousOrderRevision | integer. The revision number of the previous order. This helps ensure that the modification is applied to the correct version of the order. |
Quantity | real. The new quantity of the order. This value can only be reduced from a previous quantity. |
AccountId | integer. The ID of the account associated with the order being modified. |
Response
The response acknowledges the successful receipt of your request to modify an order; it does not indicate that the order has been modified. To find if an order has been modified, check using GetOpenOrders and GetOrderHistory.
Key | Value |
---|---|
result | Boolean. The successful receipt of a modify order request returns true; otherwise, returns false. This is the acknowledgment of receipt of the request to modify, not a confirmation that the modification has taken place. |
errormsg | string. A successful receipt of a modify request returns null; the errormsg parameter for an unsuccessful request returns one of the following messages: Not Authorized (errorcode 20) Invalid Request (errorcode 100) Operation Failed (errorcode 101) Server Error (errorcode 102) Resource Not Found (errorcode 104) |
errorcode | integer. The receipt of a successful request to modify returns 0. An unsuccessful request returns one of the errorcodes shown in the errormsg list. |
detail | string. Message text that the system may send. Usually null. |
Last updated