# Fungible token daily rate

`FTDailyRate` entity represents daily average rates for fungible tokens traded on the Casper Network tracked in various [currencies](https://docs.cspr.cloud/rest-api/currency) .

### Properties

The `FTDailyRate` entity has the following properties:

| Property                      | Type       | Description                                                           |
| ----------------------------- | ---------- | --------------------------------------------------------------------- |
| `token_contract_package_hash` | `string`   | Fungible token contract package hash                                  |
| `currency_id`                 | `uint16`   | [Currency](https://docs.cspr.cloud/rest-api/currency) identifier      |
| `amount`                      | `float64`  | Volume-weighted average daily rate amount in the specified currency   |
| `volume`                      | `string`   | The total swap volume used to compute the daily rate                  |
| `dex_ids`                     | `[]uint16` | DEX identifiers used in the aggregation                               |
| `date`                        | `string`   | Date in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format |

**Example**

```json
{
  "amount": "0.25",
  "volume": "1234567890000000000",
  "token_contract_package_hash": "b1c2d3e4f5g6h7i8j9k0l1m2n3o4p5q6r7s8t9u0v1w2x3y4z5a6",
  "dex_ids": [2, 4],
  "currency_id": 1,
  "date": "2024-01-05T00:00:00Z"
}
```

### Optional properties

None

### Relations

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

| Entity                                                                 | Mapping property              | Description                                         |
| ---------------------------------------------------------------------- | ----------------------------- | --------------------------------------------------- |
| [`ContractPackage`](https://docs.cspr.cloud/rest-api/contract-package) | `token_contract_package_hash` | Rates are tracked for fungible token contracts      |
| [`Currency`](https://docs.cspr.cloud/rest-api/currency)                | `currency_id`                 | Rates are calculated for different currencies       |
| [`DEX`](https://docs.cspr.cloud/rest-api/dex)                          | `dex_ids`                     | Rates aggregate trades across relevant Casper DEXes |

## Endpoints

The fungible token fiat rate endpoints are:

* [Get the latest daily fungible token contract rate](https://docs.cspr.cloud/rest-api/fungible-token-daily-rate/get-latest-daily-token-contract-rate)
* [Get historical daily fungible token contract rates](https://docs.cspr.cloud/rest-api/fungible-token-daily-rate/get-daily-token-contract-rates)
