Trading:PlaceOrder

Places an Order for a symbol.

Successful completion of this action does not mean your Order has been placed 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: PlaceOrder
Action: Publish
Permissions: Zenith/OrderPad

Request

Name Type Expect Description
Account String Always The Account to place the Order through
Details Object Always An Order Details object describing the Order to place
Flags Array Optional An array of string flags. See Appendix F: Order Flags for more information
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 Always An Order Route object providing routing instructions
Condition Object Optional Describes the activation condition of the Order.

Order Details object

Name Type Expect Description
Exchange String Always The code for the Exchange the symbol belongs to. Use Symbol.Exchange, and if omitted, use Symbol.Market
Code String Always The code of the Symbol to place the Order for
Side String Always The side of the market the Order belongs to. One of the following values:
Bid – place a buy/subscribe Order.
Ask – place a sell/redemption Order
Style String Always The style of the Order to place, which should correspond to the Class for the associated Symbol. One of the following values:
Market
ManagedFund
BrokerageSchedule String Optional Defines the brokerage schedule to use. If omitted, uses the default for the Trading Account.
Instructions Array Optional An optional array of market-specific execution instruction codes.

Extra fields depend on the Style of Order

Market Order Details

When Style is Equity or Option, the Order Details can have these additional fields:

Name Type Expect Description
Type String Always The type of equity Order. One of the following values:
Limit.
Best.
Market.
MarketToLimit
LimitPrice Decimal Optional The price to place the Order at. Valid for Limit only
Quantity Decimal Always The number of visible shares involved in the Order
HiddenQuantity Decimal Optional The hidden quantity of shares involved. Omit if there is no hidden quantity
MinimumQuantity Decimal Optional The minimum quantity to shares for this Order to execute. Only supported on some markets
Validity String Always The validity criteria for the Order. One of the following values:
UntilCancel – Order exists until cancelled or the Expiry date is hit.
UntilDay - Order exists for the day.
FillAndKill – Trades as much as possible then cancels. Also known as Immediate-or-Cancel.
FillOrKill – Trades the entire quantity immediately, or cancels.
AllOrNone – Only executes when it can trade the entire quantity. Exists until cancelled or the Expiry date is hit.
ExpiryDate Date Optional The expiry date of the Order. Omit to last until cancelled. In ISO-8601 format.
ShortType String Optional The type of Short Sell. Omit if this is not a Short Sell order. One of the following values
ShortSell - Order is a Short Sell.
ShortSellExempt - Order is a Short Sell, exempt from certain market rules.

Managed Fund Order Details

When Style is ManagedFund, the Order Details can have these additional fields:

Name Type Expect Description
UnitType String Always The type of unit the amount is specified in. One of the following values:
Currency – amount is a quantity of a currency.
Units – amount is a number of units
UnitAmount Decimal Always The amount to order
Currency String Optional The currency the unit amount is represented in. Required if UnitType is set to Currency
PhysicalDelivery Boolean Optional Whether physical delivery is requested. Defaults to false

Order Route object

Name Type Expect Description
Algorithm String Always The name of the Routing Algorithm to use.

Algorithm-specific fields can be included on this object. See Appendix C: Routing Algorithms for details.

Order Condition object

Name Type Expect Description
Name String Always The type of condition. One of the following values:
StopLoss - Describes a Stop Loss
TrailingStopLoss - Describes a Trailing Stop Loss

Condition-specific fields can be included on this object. See Appendix B: Order Conditions for details.

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":"PlaceOrder",
        "TransactionID":1,
        "Data":
        {
                "Account":"1234[Demo]",
                "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
        }
}