Skip to main content

Interface: IBrokerAccountInfo

Broker.IBrokerAccountInfo

Hierarchy

Methods

accountsMetainfo

accountsMetainfo(): Promise<AccountMetainfo[]>

The library calls accountsMetainfo to get a list of accounts for a particular user. The method should return an array that contains an ID and name for each account.

Note that if accountsMetainfo returns an array containing more than one element, you should implement the setCurrentAccount method. Refer to Multiple accounts for more information.

Returns

Promise<AccountMetainfo[]>


currentAccount

currentAccount(): AccountId

The library calls currentAccount to get the current account's ID.

Returns

AccountId


setCurrentAccount

setCurrentAccount(id): void

The library calls setCurrentAccount when users switch accounts using the drop-down menu in the Account Manager. This method provides your backend server with the ID of the selected account.

Note that setCurrentAccount is required if accountsMetainfo returns an array containing more than one element. Refer to Multiple accounts for more information.

Parameters

NameTypeDescription
idAccountIdThe ID of the selected account.

Returns

void