# Get account delegations

Get paginated list of delegations made by an account.

```
GET /accounts/{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-1.0.x/docs/public/rest-api/delegation/account-info.md) | Account info of delegator public key |
| `validator_account_info` | [AccountInfo](https://github.com/make-software/casper-middleware/blob/documentation-1.0.x/docs/public/rest-api/delegation/account-info.md) | Account info of validator public key |

## Response

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

## Example

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

```json
{
  "item_count": 129,
  "page_count": 13,
  "data": [
    {
      "bonding_purse": "uref-0ac1ba0100574729337b63b11e1f933b91d1d0f220823bef502bd8957305976b-007",
      "public_key": "018afa98ca4be12d613617f7339a2d576950a2f9a92102ca4d6508ee31b54d2c02",
      "stake": "55342872342594023",
      "validator_public_key": "017d96b9a63abcb61c870a4f55187a0a7ac24096bdb5fc585c12a686a4d892009e"
    },
    {
      "bonding_purse": "uref-917e1aeba7e7d3a322e89069e88b6e0877a59d781840c0ce8223e990e0342d42-007",
      "public_key": "018afa98ca4be12d613617f7339a2d576950a2f9a92102ca4d6508ee31b54d2c02",
      "stake": "55334239891699578",
      "validator_public_key": "0106ca7c39cd272dbf21a86eeb3b36b7c26e2e9b94af64292419f7862936bca2ca"
    },
    ...
    {
      "bonding_purse": "uref-64b18eba7bea61163415e728cc8aec51208e14c7abf29d1ce4d50d317ca43053-007",
      "public_key": "018afa98ca4be12d613617f7339a2d576950a2f9a92102ca4d6508ee31b54d2c02",
      "stake": "10101529405231091",
      "validator_public_key": "01aea86e5fccdf72daa7c65cc8b3d2ca96a006a0dcd70d3617f85fef00b9d78464"
    }
  ]
}
```
