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

# List Accounts

> List all sub-accounts under your Prime Account

# List Accounts

Returns all sub-accounts belonging to the authenticated Prime Account.

## Request

```
GET /accounts
```

No parameters required.

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl https://prime-api.legend.xyz/accounts \
    -H "Authorization: Bearer $LEGEND_QUERY_KEY"
  ```

  ```typescript TypeScript theme={null}
  const { accounts } = await client.accounts.list();
  ```

  ```python Python theme={null}
  result = await client.accounts.list()
  accounts = result["accounts"]
  ```

  ```rust Rust theme={null}
  let accounts = client.accounts.list().await?;
  ```
</CodeGroup>

```json Response theme={null}
{
  "accounts": [
    {
      "account_id": "acc_2o0yiljtp378",
      "signer_type": "eoa",
      "signer_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
      "legend_wallet_address": "0xc40897f38bc3d4e4d17f9daf46d2a13b4c47642f",
      "created_at": "2025-06-15T10:30:00Z"
    },
    {
      "account_id": "acc_gmi200ohuhq6",
      "signer_type": "eoa",
      "signer_address": "0x8Ba1f109551bD432803012645Ac136ddd64DBA72",
      "legend_wallet_address": "0x8d63d02feb8910736c575808a1691cd70325bbe3",
      "created_at": "2025-06-16T09:15:00Z"
    }
  ]
}
```

### Response fields

| Field                              | Type   | Description                       |
| ---------------------------------- | ------ | --------------------------------- |
| `accounts`                         | array  | List of sub-account objects       |
| `accounts[].account_id`            | string | Unique identifier (`acc_` prefix) |
| `accounts[].signer_type`           | string | Signer type (`"eoa"`)             |
| `accounts[].signer_address`        | string | Signer's Ethereum address         |
| `accounts[].legend_wallet_address` | string | On-chain wallet address           |
| `accounts[].created_at`            | string | ISO 8601 timestamp                |
