Skip to content

Trading:Holdings

Announces the current Holdings for a Trading Account.

To uniquely identify a Holding, combine the Exchange and Code fields, along with the Account field if you care about cross-Account uniqueness.

Controller: Trading
Topic: Holdings or Holdings![ID]
Action: Sub
Permissions: Zenith/Trading
Server-side Unsubscribe: Yes

FormatDescriptionExample
HoldingsReceive all data available on this login.Holdings
Holdings![ID]Receive data for a specific Trading Account.Holdings!OM1234
NameDescription
IDThe Trading Account identifier to announce Order Audit records for.

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

NameTypeExpectDescription
OStringAlwaysThe operation being performed. One of:
A: Adding a new Holding.
U: Updating an existing Holding.
R: Removing a Holding.
C: Clearing all Holdings.
AccountStringOptionalThe target account. Will be provided when clearing.
HoldingObjectOptionalA Holding Details object. Will be omitted when clearing. Will always be provided in all other situations.
NameTypeExpectDescription
ExchangeStringAlwaysThe exchange this Symbol is issued by.
CodeStringAlwaysThe code for the Symbol being held.
AccountStringAlwaysThe account the Holding belongs to.
StyleStringAlwaysThe style of Holding, which should correspond to the Class for the associated Symbol. One of the following values:
Market
ManagedFund
CostDecimalAlwaysThe total purchase value of the Holding.
CurrencyDecimalAlwaysThe currency code this Holding’s values are quoted in.

Extra fields depend on the Style of Holding.

When Style is Market, the Holding Details can have these additional fields:

NameTypeExpectDescription
TotalQuantityDecimalAlwaysThe total shares held.
TotalAvailableDecimalAlwaysThe total shares available for trading.
AveragePriceDecimalAlwaysThe average price as calculated for this Holding.

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

NameTypeExpectDescription
TotalUnitsDecimalAlwaysThe total number of units held.
BaseCostDecimalAlwaysThe base cost per unit.

Send:

{"Controller":"Trading","Topic":"Holdings!OM12345","Action":"Sub","Confirm":true}

Receive:

{
"Controller":"Trading",
"Topic":"Holdings!OM12345",
"Data":
[
{"O":"C"},
{
"O":"A",
"Holding":
{
"Account":"OM12345",
"Exchange":"ASX",
"Code":"BHP",
"Style":"Market",
"Cost":1000.23,
"Currency":"AUD",
"TotalQuantity":10,
"TotalAvailable":10,
"AveragePrice":100.023
}
}
]
}
{"Controller":"Trading","Topic":"Holdings!OM12345","Action":"Sub","Confirm":true}