Skip to main content

IBrokerAccountInfo

Interface
Types Module: Broker

Methods

accountsMetainfo

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.

Signature

accountsMetainfo() => Promise<AccountMetainfo[]>

Returns

Promise<AccountMetainfo[]>


currentAccount

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

Signature

currentAccount() => AccountId

Returns

AccountId


setCurrentAccount

Optional

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.

Signature

setCurrentAccount(id: AccountId) => void

Parameters

NameTypeDescription
idAccountIdThe ID of the selected account.

Returns

void