Class TradingAccountsInfoMessage
This message should be sent by the provider (if any trading accounts are available) for each instrument alias
the provider has subscription for, using Layer1ApiAdminListener.onUserMessage(Object).
If provider receives TradingOnlySubscribe message, it should
send TradingAccountsInfoMessage in response for the instrument if it supports multi-account trading.
This message can be received by the strategy in Layer1ApiAdminListener.onUserMessage(Object).
To handle this message you can use AccountListManager to track any
account information.
You can also handle this message by yourself, if you don't want to use
AccountListManager.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal AccountInfoAccount info for the account of the instrument.final StringAlias of the instrument the account relates to.final booleanIf true, account information for the instrument has just been added, if false - account is no longer available. -
Constructor Summary
ConstructorsConstructorDescriptionTradingAccountsInfoMessage(String alias, AccountInfo accountInfo, boolean isAdd) -
Method Summary
-
Field Details
-
alias
Alias of the instrument the account relates to.
Alias should be null (with isAdd=true) to notify about account information for the provider before any instrument is subscribed, if such information is available before the subscription to any instrument (i.e. just connected to the provider).
If a message was previously sent with
alias = nullandisAdd = truebefore any instrument subscription, a message withalias = nullandisAdd = falseshould be sent when disconnecting from the provider to indicate the removal of account information.Sending a message with
alias = nullandisAdd = falsewill remove the account information for the provider (for all aliases). This message can be sent to remove account information even if no prior message withalias = nullandisAdd = truewas sent during the connection.On provider disconnect, the provider should remove all account information for all aliases. This can be achieved by sending messages with
alias = nullandisAdd = falseto remove accounts for all aliases, as described above.When unsubscribing from a single instrument, the provider should remove the account information only for that specific instrument by specifying the specific
aliasof the instrument in this message. -
accountInfo
Account info for the account of the instrument. -
isAdd
public final boolean isAddIf true, account information for the instrument has just been added, if false - account is no longer available.
-
-
Constructor Details
-
TradingAccountsInfoMessage
- Parameters:
alias- alias of the instrument the account relates to. Can be null to notify about account information before any instrument is subscribed.accountInfo- account info for the account of the instrumentisAdd- if true, account information for the instrument has just been added, if false - account is no longer available
-
-
Method Details