# CSPR rate

CSPR.cloud maintains historical CSPR rates provided by [CoinGecko](https://www.coingecko.com/en/coins/casper-network) for more than 40 different fiat and crypto currencies.

### Properties

The `Rate` entity has the following properties:

| Property      | Type      | Description                                                                              |
| ------------- | --------- | ---------------------------------------------------------------------------------------- |
| `currency_id` | `uint8`   | [`Currency`](https://docs.cspr.cloud/1.3.x/rest-api/cspr-rate/get-currencies) identifier |
| `amount`      | `float32` | Rate amount                                                                              |
| `created`     | `string`  | Rate timestamp in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format          |

**Example**

```json
{
  "currency_id": 1,
  "amount": 0.052947,
  "timestamp": "2024-01-05T12:51:00Z"
}
```

### Optional properties

None

### Relations

The `Rate` entity has the following relations with other entities:

| Entity                                                                        | Mapping property | Description                                             |
| ----------------------------------------------------------------------------- | ---------------- | ------------------------------------------------------- |
| [`Currency`](https://docs.cspr.cloud/1.3.x/rest-api/cspr-rate/get-currencies) | `currency_id`    | Rates are related to the specific currency              |
| [`Deploy`](https://docs.cspr.cloud/1.3.x/rest-api/account-info)               | `timestamp`      | Rates can be included into the `Deploy` entity          |
| [`Transfer`](https://docs.cspr.cloud/1.3.x/rest-api/transfer)                 | `timestamp`      | Rates can be included into the `Transfer` entity        |
| [`ValidatorReward`](https://docs.cspr.cloud/1.3.x/rest-api/validator-reward)  | `timestamp`      | Rates can be included into the `ValidatorReward` entity |
| [`DelegatorReward`](https://docs.cspr.cloud/1.3.x/rest-api/delegator-reward)  | `timestamp`      | Rates can be included into the `DelegatorReward` entity |

### Endpoints

The `Rate` entity has the following endpoints:

* [Get the current currency rate](https://docs.cspr.cloud/1.3.x/rest-api/cspr-rate/get-current-currency-rate)
* [Get historical currency rates](https://docs.cspr.cloud/1.3.x/rest-api/cspr-rate/get-historical-currency-rates)
* [Get currencies](https://docs.cspr.cloud/1.3.x/rest-api/cspr-rate/get-currencies)
