Skip to content

Trading:TradingAccounts

Announces the state of the Trading Accounts for the authenticated user.

Controller: Trading
Topic: TradingAccounts
Action: Sub
Permissions: None

Unordered Array of Trading Account Change objects

NameTypeExpectDescription
OperationStringAlwaysThe operation being performed. One of:
Add: Adding a new Trading Account.
Update: Updating an existing Trading Account.
Remove: Removing an Trading Account.
Clear: Clearing all Trading Accounts.
AccountObjectOptionalA Trading Account State object. Will be omitted when clearing. Will always be provided in all other situations.
NameTypeExpectDescription
IDStringAlwaysThe unique identifier for the Trading Account.
FeedStringAlwaysOverall status of the data feed for this Trading Account. One of:
Initialising: Feed is establishing, and will be online shortly.
Active: Feed is active and online.
Closed: Feed is active, but outside hours.
Inactive: Feed is offline, and outside hours. Data may be unavailable.
Impaired: Feed is unexpectedly offline, and data may be stale or unavailable
Expired: Feed is temporarily unavailable while a new state is prepared.
NameStringSometimesThe friendly name of this Trading Account.
ProviderStringSometimesThe underlying data feed provider.
CurrencyStringSometimesThe default trading currency for this Trading Account.
AttributesObjectSometimesAn object where the keys and values represent attributes associated with this Account.
CategoriesArraySometimesAn array of string codes representing the categories the Account belongs to, if any.

Feed status changes can be sent as just ID and Feed. In all other cases, all fields will be sent.

Send:

{"Controller":"Trading","Topic":"TradingAccounts","Action":"Sub","Confirm":true}

Receive:

{"Controller":"Trading","Topic":"TradingAccounts","Data":[
{"Operation":"Clear"},
{"Operation":"Add",{"ID":"PT56789","Name":"Paritech Account 56789","Feed":"Active","Provider":"TotalView","Currency":"AUD","CategoryCodes":["Professional"],"Attributes":{"HIN":"56789"}}}
]}
{"Controller":"Trading","Topic":"TradingAccounts","Action":"Sub","Confirm":true}

Feed Status Change:

{"Controller":"Trading","Topic":"TradingAccounts","Data":[
{"Operation":"Update",{"ID":"PT56789","Feed":"Impaired"}}
]}