# Manage Accounts

This guide explains how to [retrieve accounts by index](#retrieve-accounts-by-index), [use custom derivation paths](#retrieve-account-by-custom-derivation-path), and [iterate over multiple accounts](#iterate-over-multiple-accounts).

## Retrieve Accounts by Index

You can access accounts derived from the default BIP-44 path using [`wallet.getAccount()`](https://docs.wdk.tether.io/sdk/wallet-modules/api-reference#getaccount-index):

{% code title="Get Accounts by Index" lineNumbers="true" %}

```javascript
const account = await wallet.getAccount(0)
const address = await account.getAddress()
console.log('Account 0 address:', address)

const account1 = await wallet.getAccount(1)
const address1 = await account1.getAddress()
console.log('Account 1 address:', address1)
```

{% endcode %}

## Retrieve Account by Custom Derivation Path

You can request an account at a specific BIP-44 derivation path using [`wallet.getAccountByPath()`](https://docs.wdk.tether.io/sdk/wallet-modules/api-reference#getaccountbypath-path):

{% code title="Custom Derivation Path" lineNumbers="true" %}

```javascript
const customAccount = await wallet.getAccountByPath("0'/0/5")
const customAddress = await customAccount.getAddress()
console.log('Custom account address:', customAddress)
```

{% endcode %}

## Iterate Over Multiple Accounts

You can loop through multiple accounts using [`wallet.getAccount()`](https://docs.wdk.tether.io/sdk/wallet-modules/api-reference#getaccount-index) to inspect addresses and balances in bulk:

{% code title="Multi-Account Iteration" lineNumbers="true" %}

```javascript
async function listAccounts(wallet) {
  const accounts = []

  for (let i = 0; i < 5; i++) {
    const account = await wallet.getAccount(i)
    const address = await account.getAddress()
    const balance = await account.getBalance()
    const paymasterBalance = await account.getPaymasterTokenBalance()

    accounts.push({ index: i, address, balance, paymasterBalance })
  }

  return accounts
}
```

{% endcode %}

## Next Steps

Now that you can access your accounts, learn how to [check balances](https://docs.wdk.tether.io/sdk/wallet-modules/wallet-ton-gasless/usage/check-balances).
