Class AccountInfo
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal AccountTypeIndicates the type of account: simulated, live, or unknown.final StringUnique identifier for the account.booleanIndicates whether this account is hidden in the UI.final booleanDeprecated.each instrument can have its own primary account, and the provider should not set the primary account.final StringProgrammatic name (unique internal provider identifier) of the provider this account belongs to.final StringShort name for the account, ideally 3-5 symbols long (preferably 3), but not restricted.final StringSummary string, containing account name. -
Constructor Summary
ConstructorsConstructorDescriptionAccountInfo(String id) Deprecated.useAccountInfo(String, String, String, boolean)instead. -
Method Summary
-
Field Details
-
id
Unique identifier for the account. Must uniquely identify the account among all the providers (so provider should form the id to contain provider-specific prefix or suffix). -
summary
Summary string, containing account name. Is used as a display name for the account. -
shortName
Short name for the account, ideally 3-5 symbols long (preferably 3), but not restricted. Used for compact display in UI elements like badges and dropdown headers. If null, UI components should fallback to using summary instead. -
providerProgrammaticName
Programmatic name (unique internal provider identifier) of the provider this account belongs to. Unique among all the providers. UseProviderTypeHelperto get to short name or user name by provider programmatic name (e.g. EXT:velox.api.layer0.adapters.BinanceProvider -> "Binance"/"BN")
Note for the provider developer: this field is set by the Bookmap itself, and should not be set by the provider. (if it is set by the provider, it will be overwritten by the Bookmap anyway) -
isPrimary
Deprecated.each instrument can have its own primary account, and the provider should not set the primary account. For now, it still can be used since TCP selected accounts are synchronized among all instruments for the same provider.If true - this account is used as a default account, when the strategy is not aware of multi-account data (i.e. the strategy will receive the user orders data only from this account, and the strategy will be available to send/update orders only to this account).Previously the primary account was the account selected with
SelectAccountMessagefor all instruments of the provider. User selected the primary account with the Account Selector pop-up on provider connection.
Now each instrument can have its own primary account, and the provider should not set the primary account.
The primary account is set by the Bookmap itself, when the user selects the primary account on the TCP (trading control panel) for the given instrument.
Data for non-primary accounts is send to the strategy only if it has
Layer1MultiAccountTradingSupportedannotation, or if such data has no account specified (i.e. accountId is null). -
accountType
Indicates the type of account: simulated, live, or unknown.Live broker accounts should set this to
LIVE. Paper-/demo-/Bookmap-simulator accounts should set it toSIMULATED. If the account type is unknown or not specified, it should be set toUNKNOWN. The field is advisory: Bookmap uses it to display trading badges and to inform add-ons about current trading mode. -
isHidden
public boolean isHiddenIndicates whether this account is hidden in the UI. The account could be hidden if the cross-trading is enabled for the host instrument.
-
-
Constructor Details
-
AccountInfo
Deprecated.useAccountInfo(String, String, String, boolean)instead. Deprecated because id is supposed to be unique and should not be used as a summary (displayed name).- Parameters:
id- account id (unique identifier for the account). Used both for id and summary.
-
-
Method Details