Skip to content

AccountSwitchedEventArgs

class cAlgo.API

DesktopCLICloud

Provides data for the account switched event.

Definition

public class AccountSwitchedEventArgs

Namespace: cAlgo.API · Group: EventArgs

Examples

protected override void OnStart()
{
    Account.Switched += OnAccountSwitched;
}

private void OnAccountSwitched(AccountSwitchedEventArgs args)
{
    Print("Account switched from {0} to {1}", args.PreviousAccountNumber, args.CurrentAccountNumber);
}
def on_start(self):
    api.Account.Switched += self.on_account_switched

def on_account_switched(self, args):
    api.Print(f"Account switched from {args.PreviousAccountNumber} to {args.CurrentAccountNumber}")

Properties

Name Description
CurrentAccountNumberDesktopCLICloudint Returns new account number.
PreviousAccountNumberDesktopCLICloudint Returns previous account number.

See also