---
id: "P:cAlgo.API.AccountSwitchedEventArgs.CurrentAccountNumber"
kind: "property"
type: "T:cAlgo.API.AccountSwitchedEventArgs"
url: "https://help.ctrader.com/ctrader-algo/references/EventArgs/AccountSwitchedEventArgs/CurrentAccountNumber/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# AccountSwitchedEventArgs.CurrentAccountNumber

Member of [AccountSwitchedEventArgs](https://help.ctrader.com/ctrader-algo/references/EventArgs/AccountSwitchedEventArgs/index.md).

## CurrentAccountNumber

Returns new account number.

Environments: Desktop supported · CLI supported · Cloud supported.

C#:

```csharp
public int CurrentAccountNumber {get;}
```

Python:

```python
accountSwitchedEventArgs.CurrentAccountNumber: int
```

### Returns

`int` — 

### Examples

C#:

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

private void OnAccountSwitched(AccountSwitchedEventArgs args)
{
    Print("Now trading on account {0}, balance: {1}", args.CurrentAccountNumber, Account.Balance);
}
```

Python:

```python
def on_start(self):
    api.Account.Switched += self.on_account_switched

def on_account_switched(self, args):
    api.Print(f"Now trading on account {args.CurrentAccountNumber}, balance: {api.Account.Balance}")
```

