# Get validator delegations

Get paginated list of delegations made to a validator.

```
GET /validators/{public_key}/delegations
```

## Query params

None

## Sorting

| Property | Description          |
| -------- | -------------------- |
| `stake`  | Sort by stake amount |

Default sorting is `stake DESC`

## Optional properties

| Property                   | Type                                                                                                                                                          | Description                                                                                             |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| `account_info`             | [AccountInfo](https://github.com/make-software/casper-middleware/blob/documentation/docs/public/rest-api/delegation/account-info.md)                          | [Account info](https://github.com/make-software/casper-account-info-contract) provided by the delegator |
| `validator_account_info`   | [AccountInfo](https://github.com/make-software/casper-middleware/blob/documentation/docs/public/rest-api/delegation/account-info.md)                          | [Account info](https://github.com/make-software/casper-account-info-contract) provided by the validator |
| `centralized_account_info` | [`CentralizedAccountInfo`](https://github.com/make-software/casper-middleware/blob/documentation/docs/public/rest-api/delegation/centralized-account-info.md) | Account information available for known accounts provided by CSPR.cloud team                            |
| `bidder`                   | [`Bidder`](https://github.com/make-software/casper-middleware/blob/documentation/docs/public/rest-api/delegation/bidder.md)                                   | Bidder auction info of the validator                                                                    |
| `cspr_name`                | `string`                                                                                                                                                      | Primary CSPR.name of the account                                                                        |
| `validator_cspr_name`      | `string`                                                                                                                                                      | Primary CSPR.name of the validator account                                                              |

## Response

[`PaginatedResponse`](https://docs.cspr.cloud/documentation/overview/pagination)[`<Delegation>`](https://docs.cspr.cloud/rest-api/delegation)

## Example

```bash
curl -X 'GET' \
  'https://api.testnet.cspr.cloud/validators/0106ca7c39cd272dbf21a86eeb3b36b7c26e2e9b94af64292419f7862936bca2ca/delegations?limit=2&offset=0' \
  -H 'Accept: application/json' \
  -H 'Authorization: 55f79117-fc4d-4d60-9956-65423f39a06a'
```

```json
{
  "item_count": 128,
  "page_count": 13,
  "data": [
    {
      "bonding_purse": "uref-917e1aeba7e7d3a322e89069e88b6e0877a59d781840c0ce8223e990e0342d42-007",
      "delegator_identifier": "018afa98ca4be12d613617f7339a2d576950a2f9a92102ca4d6508ee31b54d2c02",
      "delegator_identifier_type_id": 0,
      "public_key": "018afa98ca4be12d613617f7339a2d576950a2f9a92102ca4d6508ee31b54d2c02",
      "stake": "99348274926678796",
      "validator_public_key": "0106ca7c39cd272dbf21a86eeb3b36b7c26e2e9b94af64292419f7862936bca2ca"
    },
    {
      "bonding_purse": "uref-ee8e4e63ee02f7cd38838b07bdd591cc8986bf6e8e5724dd0d54328e76b8dda0-007",
      "delegator_identifier": "011b5b2e370411b6df3a3d8ac0063b35e2003994a634dba48dd5422247fc1e7c41",
      "delegator_identifier_type_id": 0,
      "public_key": "011b5b2e370411b6df3a3d8ac0063b35e2003994a634dba48dd5422247fc1e7c41",
      "stake": "159326721297057",
      "validator_public_key": "0106ca7c39cd272dbf21a86eeb3b36b7c26e2e9b94af64292419f7862936bca2ca"
    },
    ...
    {
      "bonding_purse": "uref-0979efcbf321998cd0c65a755a668f555be56ad1c0a063fe289fbdc4467f7519-007",
      "delegator_identifier": "0111dad2c2c4769e5fb723fa4fdb432a7d39c48a575a361dca1ff8693e715642df",
      "delegator_identifier_type_id": 0,
      "public_key": "0111dad2c2c4769e5fb723fa4fdb432a7d39c48a575a361dca1ff8693e715642df",
      "stake": "3791559906526",
      "validator_public_key": "0106ca7c39cd272dbf21a86eeb3b36b7c26e2e9b94af64292419f7862936bca2ca"
    }
  ]
}
```
