> ## Documentation Index
> Fetch the complete documentation index at: https://docs.startale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# wallet_getSubAccounts

> List sub-accounts the current application has previously created for the connected user.

Returns the array of sub-accounts your application has created for the connected user. Empty if none.

## Request

```ts theme={null}
const { subAccounts } = await provider.request<{ subAccounts: SubAccount[] }>({
  method: 'wallet_getSubAccounts',
})
```

## Parameters

None.

## Returns

```ts theme={null}
{
  subAccounts: [
    {
      address: '0x...',
      chainId: '0x74c',
      factory: '0x...',
      factoryData: '0x...',
    },
  ],
}
```

## Errors

| Code   | Cause                |
| ------ | -------------------- |
| `4100` | Wallet not connected |

## Related

* [`wallet_addSubAccount`](/api-reference/rpc-methods/wallet-add-sub-account), create a new sub-account.
* [Sub-accounts](/app-sdk/sub-accounts)
