# Validator performance

The `ValidatorPerformance` entity provides the validator performance score as the percentage of rewards received per one token relative to the maximum ratio received by a validator in the given era. A validator that received the highest ratio will have a 100 score.

The average performance endpoints return moving average of the validator performance for the past 360 eras (approximately one month).

## Properties

The `ValidatorPerformance` entity has the following properties:

| Property     | Type         | Description                                              |
| ------------ | ------------ | -------------------------------------------------------- |
| `public_key` | `string(68)` | Validator public key represented as a hexadecimal string |
| `era_id`     | `uint32`     | Era identifier                                           |
| `score`      | `float64`    | Validator performance score for the era                  |

**Example**

```json
{
  "public_key": "01e8121a2586a6add8a65990080633adfa4e0d32088d36d7fb6f6d3ede1bd7b823",
  "era_id": 12013,
  "score": 100
}
```

## Optional properties

None

## Relations

| Entity                                                          | Mapping property | Description                       |
| --------------------------------------------------------------- | ---------------- | --------------------------------- |
| [`Validator`](https://docs.cspr.cloud/1.1.x/rest-api/validator) | `public_key`     | Validators have performance score |

## Endpoints

The `ValidatorPerformance` entity has the following endpoints:

* [Get historical validator performance](https://docs.cspr.cloud/1.1.x/rest-api/validator-performance/get-historical-validator-performance)
* [Get historical average validator performance](https://docs.cspr.cloud/1.1.x/rest-api/validator-performance/get-historical-average-validator-performance)
* [Get historical average validators performances](https://docs.cspr.cloud/1.1.x/rest-api/validator-performance/get-historical-average-validators-performance)

## Relation endpoints

None
