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

> ## Agent Instructions
> If you are building a Canton Network application, start from https://docs.canton.network/appdev/quickstart.md. To run only a local network for your own Daml code, without building the QuickStart demo, see https://docs.canton.network/sdks-tools/development-tools/localnet.md.

# ListAccounts

Other APIs

›

[gRPC API](https://docs.canton.network/reference/grpc-ledger-api-reference/overview.md)

›

[com.digitalasset.canton.tea.v1](https://docs.canton.network/reference/grpc-ledger-api-reference/com-digitalasset-canton-tea-v1.md)

›

ListAccounts

com.digitalasset.canton.tea.v1

# ListAccounts

gRPC

[Added 3.8.0](#history-added-3-8-0)

RPC

`/com.digitalasset.canton.tea.v1.TrafficService/ListAccounts`

## Protocol Details

Protocol
gRPC

Service
TrafficService

RPC
ListAccounts

Client stream
No

Server stream
No

## Inputs

### ListAccountsRequest

Message
com.digitalasset.canton.tea.v1.ListAccountsRequest

Client stream
No

`page_size`
int32

`page_token`
string

`account_id_prefix`
string

## Outputs

### ListAccountsResponse

Message
com.digitalasset.canton.tea.v1.ListAccountsResponse

Server stream
No

`accounts`
repeated GetAccountResponse

`next_page_token`
string

## Related Schemas

> [accordion] com.digitalasset.canton.tea.v1.ListAccountsRequest
>
> `page_size`
> int32
>
> `page_token`
> string
>
> `account_id_prefix`
> string

> [accordion] com.digitalasset.canton.tea.v1.ListAccountsResponse
>
> `accounts`
> repeated GetAccountResponse
>
> `next_page_token`
> string

> [accordion] com.digitalasset.canton.tea.v1.GetAccountResponse
>
> `account_id`
> string
>
> `balance`
> int64

## History

Added
`3.8.0`

grpcurl

```bash grpcurl theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Add -plaintext if the server is not using TLS.
grpcurl \
  -d @ \
  <HOST:PORT> \
  com.digitalasset.canton.tea.v1.TrafficService/ListAccounts <<'EOF'
{
  "pageSize": 0,
  "pageToken": "string",
  "accountIdPrefix": "string"
}
EOF
```

OK

application/json

```json OK theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "accounts": [
    {
      "accountId": "string",
      "balance": "0"
    }
  ],
  "nextPageToken": "string"
}
```
