# Get accounts

Get the paginated list of accounts

```
GET /accounts
```

## Query params

| Query param    | Description                            |
| -------------- | -------------------------------------- |
| `account_hash` | Comma-separated list of account hashes |

## Sorting

| Property        | Description                                                               |
| --------------- | ------------------------------------------------------------------------- |
| `balance`       | Sort accounts by the main purse balance                                   |
| `total_balance` | Sort accounts by the total account balance, including the delegated funds |

Default sorting is `total_balance DESC`

## Optional properties

| Property                   | Type                                                              | Description                                                                                                 |
| -------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `auction_status`           | `string`                                                          | Account auction status: `inactive_bidder`, `active_bidder`, `active_validator`, `pending_validator`         |
| `delegated_balance`        | `uint64`                                                          | Total funds delegated across all validators                                                                 |
| `staked_balance`           | `uint64`                                                          | Total funds staked as validator                                                                             |
| `undelegating_balance`     | `uint64`                                                          | Total undelegated funds that will be returned to the account main purse after the 7 era lockdown period     |
| `account_info`             | [`AccountInfo`](/rest-api/account-info.md)                        | [Account info](https://github.com/make-software/casper-account-info-contract) provided by the account owner |
| `centralized_account_info` | [`CentralizedAccountInfo`](/rest-api/centralized-account-info.md) | Account information available for known accounts provided by CSPR.cloud team                                |
| `cspr_name`                | `string`                                                          | Primary CSPR.name of the account                                                                            |
| `rank`                     | `uint64`                                                          | Rank of the account based on its total balance on the network                                               |

## Response

[`PaginatedResponse`](/documentation/overview/pagination.md)[`<Account>`](/rest-api/account.md)

## Example

```bash
curl -X 'GET' \
  'https://api.testnet.cspr.cloud/accounts' \
  -H 'accept: application/json' \
  -H 'authorization: 55f79117-fc4d-4d60-9956-65423f39a06a'
```

```json
{
  "data": [
    {
      "account_hash": "b383c7cc23d18bc1b42406a1b2d29fc8dba86425197b6f553d7fd61375b5e446",
      "balance": "8744504704680363000",
      "deployment_threshold": 1,
      "genesis_balance": "9999995600000000000",
      "key_management_threshold": 1,
      "main_purse_uref": "uref-b06a1ab0cfb52b5d4f9a08b68a5dbe78e999de0b0484c03e64f5c03897cf637b-007",
      "public_key": "018afa98ca4be12d613617f7339a2d576950a2f9a92102ca4d6508ee31b54d2c02"
    },
    {
      "account_hash": "681a66e75cdeacd4c00ec94b1508b75f2e4dbb4b04ca732be688a006317f47d6",
      "balance": "57000019000000000",
      "deployment_threshold": 1,
      "genesis_balance": null,
      "key_management_threshold": 1,
      "main_purse_uref": "uref-b1376e532a6af911a692cec42b3468c90e6d84f6edeea4b20c824062affa7c4e-007",
      "public_key": "0202036ef47003f6f2dbb7d2d9f00d191146e4890ed289e31b7fab02035c1ddd8ca3"
    },
    ...
    {
      "account_hash": "9081ded33b9d55aab6801da9c2fa5ce0750aee6eac158ae4989ee733def542f3",
      "balance": "2122653718133811",
      "deployment_threshold": 1,
      "genesis_balance": null,
      "key_management_threshold": 1,
      "main_purse_uref": "uref-ee882b37ed505a6fb240b2cc843c82c5a8107fafc2a234c5838ac9013b98046e-007",
      "public_key": "015ac0d71b2142f35c974471589876bc7684bf4e495354a885ebd0ac2b1ffbcc01"
    }
  ],
  "item_count": 101225,
  "page_count": 10123
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cspr.cloud/rest-api/account/get-accounts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
