# Get validator blocks

Get paginated list of blocks proposed by the validator

```
GET /validators/{public_key}/blocks
```

## Query params

None

## Sorting

| Property       | Description                 |
| -------------- | --------------------------- |
| `block_height` | Sort blocks by block height |
| `timestamp`    | Sort blocks by timestamp    |

Default sorting is `block_height DESC`

## Optional properties

| Property                | Type   | Description                         |
| ----------------------- | ------ | ----------------------------------- |
| `proposer_account_info` | `JSON` | Account info of proposer public key |

## Response

[`PaginatedResponse`](https://docs.cspr.cloud/1.1.x/documentation/overview/pagination)[`<Block>`](https://docs.cspr.cloud/1.1.x/rest-api/block)

## Example

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

```json
{
  "data": [
    {
      "block_height": 2293945,
      "block_hash": "fc96e8c2735ee8c1fe0e8df74b7de005298e259bb0e84953c584a30b417e51c1",
      "parent_block_hash": "18a93ef00cbd298e6633d4e6adc726dfdbd1a3af31107bd93268745b096b7f30",
      "state_root_hash": "89e786fd598f9f2f84955daaacc1573a1414fdf8dfa8c93e116ff70402c0bbfb",
      "era_id": 11750,
      "proposer_public_key": "0109b48a169e6163078a07b6248f330133236c6e390fe915813c187c3f268c213e",
      "native_transfers_number": 0,
      "contract_calls_number": 0,
      "is_switch_block": false,
      "timestamp": "2023-12-18T13:38:12Z"
    },
    {
      "block_height": 2293908,
      "block_hash": "1e6b1f9c1c315742791693f238809782e58424c0fd41b146e5c8922068aa617b",
      "parent_block_hash": "e09513444638ab4b5da58d1d7c7e2ed29675107af42d5f3c0f55335bff69a2b8",
      "state_root_hash": "f842549d60720f646b5b6b3f27d74745f2a35da8d5444e32eb35ef585322cd25",
      "era_id": 11750,
      "proposer_public_key": "0109b48a169e6163078a07b6248f330133236c6e390fe915813c187c3f268c213e",
      "native_transfers_number": 0,
      "contract_calls_number": 0,
      "is_switch_block": false,
      "timestamp": "2023-12-18T13:17:59Z"
    },
    ...
    {
      "block_height": 2293599,
      "block_hash": "21b4c4739049fa4cb4ed0a5e45ccf56869e08f686d2d0c4eafb0f34f0e352d93",
      "parent_block_hash": "99974aceccd64c5d0c6ebedd5ea8022e45519754615a3f9d2d6db547143a57ca",
      "state_root_hash": "4d0650fe03069a42c834323ca9a33c94b50b7ffd554db25c1dcd32347e1be6cf",
      "era_id": 11748,
      "proposer_public_key": "0109b48a169e6163078a07b6248f330133236c6e390fe915813c187c3f268c213e",
      "native_transfers_number": 0,
      "contract_calls_number": 0,
      "is_switch_block": false,
      "timestamp": "2023-12-18T10:29:14Z"
    }
  ],
  "item_count": 76609,
  "page_count": 7661
}
```
