Skip to content

Market:Trades

Announces incoming trades for a Security.

Initialise occurs upon the initial subscription, upon a new trading day for the market, and if there were any issues upstream that may have caused lost trades.

This subscription is only available for symbols that offer Trades in their SubscriptionData.

Controller: Market
Topic: Trades![Code].[Market]
Action: Sub
Permissions: Zenith/Market
Server-side Unsubscribe: Yes

FormatDescriptionExample
Trades![Code].[Market]Receive trades relating to a symbol.Trades!BHP.ASX
NameDescription
MarketThe code for listing Market of the desired symbol. Can be a Mixed Market code.
CodeThe code of the desired symbol.

An ordered array of zero or more Trade Change objects, to be applied in sequence.

NameTypeExpectDescription
OStringAlwaysThe operation being performed. One of:
A:: Adding a new Trade.
U: Updating an existing Trade
I:: Initialise the list of trades
IDIntegerOptionalWhen Initialising, identifies the most recently received Trade, for supplying to QueryTrades
TradeObjectOptionalWhen adding or updating a Trade, contains the trade details
NameTypeExpectDescription
IDIntegerAlwaysThe trade identifier, unique for the subscribed Security. More recent trades have higher numbers. Is not guaranteed sequential.
PriceDecimalOptionalThe price of the Trade.
QuantityDecimalOptionalThe total number of shares traded.
TimeDateTimeOptionalThe date and time the Trade occurred, in ISO-8601 format (including timezone).
FlagsStringOptionalAny flags applied to this Trade. One of: Cancel: Trade is a cancellation. OffMarket. PlaceHolder
TrendStringOptionalA change in the trend for this Trade. If omitted, defaults to None. One of:
None: There is no trend (off-market).
Up: This trade represents an up-tick.
Down: This trade represents a down-tick.
SideStringOptionalThe side of the market that caused the Trade (aggressor). If omitted, means there is no aggressor. One of:
Bid: Bid (buy) order.
Ask: Ask (sell) order.
AffectsStringOptionalThe fields affected by this Trade. If omitted, all fields are affected. One or more of the following fields, comma delimited:
None: Affects no fields at all.
Price: Affects price fields (O/H/L/Last).
Volume: Affects traded volume.
VWAP: Affects volume weighted average price.
CodesStringOptionalThe condition codes on this Trade. If omitted, there are no condition codes.
BuyStringOptionalThe depth identifier of the Buy Order that caused this Trade, if available.
BuyBrokerStringOptionalA code identifying the broker who placed the buy Order that caused this Trade. Will only be supplied if the identified client has the appropriate rights to view it.
BuyCrossRefStringOptionalA code referencing the buy Order that caused this Trade. Will only be supplied if the identified client has the appropriate rights to view it.
SellStringOptionalThe depth identifier of the Sell Order that caused this Trade, if available.
SellBrokerStringOptionalA code identifying the broker who placed the sell Order that caused this Trade. Will only be supplied if the identified client has the appropriate rights to view it.
SellCrossRefStringOptionalA code referencing the sell Order that caused this Trade. Will only be supplied if the identified client has the appropriate rights to view it.
MarketStringOptionalThe original Market that executed this Trade, when using Mixed Markets.
RelatedIDIntegerOptionalAn ID related to this Trade. For cancellations, will reference the original Trade.
AttributesArrayOptionalAn array of Market-Specific attribute strings that apply to this Trade.

Send:

{"Controller":"Market","Topic":"Trades!BHP.ASX","Action":"Sub","Confirm":true}

Receive:

{"Controller":"Market","Topic":"Trades!BHP.ASX","Data":[{"O":"I","ID":10000}]}
{"Controller":"Market","Topic":"Trades!BHP.ASX","Action":"Sub","Confirm":true}

Upon receiving the initialise, the client can then make a request to QueryTrades to retrieve the desired amount of trade history.

Send:

{"Controller":"Market","Topic":"QueryTrades","TransactionID":1234,"Data":{"Market":"ASX","Code":"BHP","LastTradeID":10000,"Count":100}}