Skip to content

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

NameTypeExpectDescription
AccountStringAlwaysThe Account to place the Order through
DetailsObjectAlwaysAn Order Details object describing the Order to place
FlagsArrayOptionalAn array of string flags. See Appendix F: Order Flags for more information
RequestIDStringOptionalA string to uniquely (within this Account) identify this request. If omitted, a random 22-character alphanumeric string will be generated by the server.
RouteObjectAlwaysAn Order Route object providing routing instructions
ConditionObjectOptionalDescribes the activation condition of the Order.
NameTypeExpectDescription
ExchangeStringAlwaysThe code for the Exchange the symbol belongs to. Use Symbol.Exchange, and if omitted, use Symbol.Market
CodeStringAlwaysThe code of the Symbol to place the Order for
SideStringAlwaysThe 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
StyleStringAlwaysThe style of the Order to place, which should correspond to the Class for the associated Symbol. One of the following values:
Market
ManagedFund
BrokerageScheduleStringOptionalDefines the brokerage schedule to use. If omitted, uses the default for the Trading Account.
InstructionsArrayOptionalAn optional array of market-specific execution instruction codes.

Extra fields depend on the Style of Order

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

NameTypeExpectDescription
TypeStringAlwaysThe type of equity Order. One of the following values:
Limit.
Best.
Market.
MarketToLimit
LimitPriceDecimalOptionalThe price to place the Order at. Valid for Limit only
QuantityDecimalAlwaysThe number of visible shares involved in the Order
HiddenQuantityDecimalOptionalThe hidden quantity of shares involved. Omit if there is no hidden quantity
MinimumQuantityDecimalOptionalThe minimum quantity to shares for this Order to execute. Only supported on some markets
ValidityStringAlwaysThe 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.
ExpiryDateDateOptionalThe expiry date of the Order. Omit to last until cancelled. In ISO-8601 format.
ShortTypeStringOptionalThe 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.

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

NameTypeExpectDescription
UnitTypeStringAlwaysThe 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
UnitAmountDecimalAlwaysThe amount to order
CurrencyStringOptionalThe currency the unit amount is represented in. Required if UnitType is set to Currency
PhysicalDeliveryBooleanOptionalWhether physical delivery is requested. Defaults to false
NameTypeExpectDescription
AlgorithmStringAlwaysThe name of the Routing Algorithm to use.

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

NameTypeExpectDescription
NameStringAlwaysThe 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.

NameTypeExpectDescription
ResultStringAlwaysThe 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.
RequestIDStringAlwaysA string to uniquely (within this Account) identify this request.
OrderObjectOptionalIf the request was successful, supplies the Order state after this request was acknowledged
ErrorsArrayOptionalIf the request failed, supplies an array of string codes identifying the errors encountered. See Appendix E: Order Error Codes for more information
EstimatedFeesObjectOptionalAn object where the key is a fee name, and the value the estimated fee this Order would incur
EstimatedValueDecimalOptionalIf able to be calculated, provides the estimated value of this Order, not including Fees (ie: Net Consideration)

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
}
}