Class AccountInfo

java.lang.Object
velox.api.layer1.data.AccountInfo

public class AccountInfo extends Object
Information about account
  • Field Details

    • id

      public final String 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

      public final String summary
      Summary string, containing account name. Is used as a display name for the account.
    • shortName

      public final String 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

      public final String providerProgrammaticName
      Programmatic name (unique internal provider identifier) of the provider this account belongs to. Unique among all the providers. Use ProviderTypeHelper to 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 public final boolean 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 SelectAccountMessage for 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 Layer1MultiAccountTradingSupported annotation, or if such data has no account specified (i.e. accountId is null).

    • isHidden

      public boolean isHidden
      Indicates 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 public AccountInfo(String id)
      Deprecated.
      use AccountInfo(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

    • toBuilder

      public AccountInfoBuilder toBuilder()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • isSimulated

      public boolean isSimulated()
    • getAccountType

      public velox.api.layer1.data.AccountType getAccountType()