Trading:AmendOrder

Requests to amend an existing Order.

Successful completion of this action does not mean your Order has been amended on the Market, only that the request has been acknowledged.

The Order state provided in this result is not synchronised with the Orders subscription, and can be older or newer than the most recent event.

Controller: Trading
Topic: AmendOrder
Action: Publish
Permissions: Zenith/OrderPad

Request

Name Type Expect Description
Account String Always The Account that owns the Order
Details Object Always The new details of the Order
Flags Array Optional An array of string flags. See Appendix F: Order Flags for more information
OrderID String Always The unique identifier of the Order to amend
RequestID String Optional A string to uniquely (within this Account) identify this request. If omitted, a random 22-character alphanumeric string will be generated by the server.
Route Object Optional If provided, describes how to route the Order. If omitted, uses the existing routing parameters
Condition Object Optional Describes the activation condition of the Order.

See the PlaceOrder query for information on the Details and Route objects

Response

Name Type Expect Description
Result String Always The result of the operation. One of the following values:
Success – Request successful.
Incomplete – Required fields are missing.
Invalid – The supplied fields are invalid.
Rejected – The order was rejected.
RequestID String Always A string to uniquely (within this Account) identify this request.
Order Object Optional If the request was successful, supplies the Order state after this request was acknowledged
Errors Array Optional If the request failed, supplies an array of string codes identifying the errors encountered. See Appendix E: Order Error Codes for more information
EstimatedFees Object Optional An object where the key is a fee name, and the value the estimated fee this Order would incur
EstimatedValue Decimal Optional If able to be calculated, provides the estimated value of this Order, not including Fees (ie: Net Consideration)

Example

Send:

{
        "Controller":"Trading",
        "Topic":"AmendOrder",
        "TransactionID":1,
        "Data":
        {
                "Account":"1234[Demo]",
                "OrderID":"00000000-0000-0000-CDEF-123456789ABC",
                "Details":
                {
                "Exchange":"ASX[Demo]",
                        "Code":"BHP",
                        "Style":"Equity",
                        "Side":"Bid",
                        "Quantity":100,
                        "Type":"MarketToLimit"
                },
                "Route":
                {
                        "Algorithm":"Market",
                        "Market":"CXA::LI[Demo]"
                }
        }
}

Receive:

{
        "Controller":"Trading",
        "Topic":"PlaceOrder",
        "TransactionID":1,
        "Data":
        {
                "Result":"Success",
                "Order":
                {
                        "ID":"00000000-0000-0000-CDEF-123456789ABC",
                        ...
                },
                "EstimatedBrokerage":10.00,
                "EstimatedValue":1000.000
        }
}