# Currency

`Currency` entity represents currencies used by [CSPR Rate](https://docs.cspr.cloud/rest-api/cspr-rate) and [Fungible token rate](https://docs.cspr.cloud/rest-api/fungible-token-rate) APIs.

### Properties

The `Currency` entity has the following properties:

| Property  | Type     | Description                                     |
| --------- | -------- | ----------------------------------------------- |
| `id`      | `int`    | Currency identifier                             |
| `code`    | `string` | Currency code                                   |
| `type_id` | `int`    | `1` for fiat currency, `2` for cryptocurrencies |

**Example**

```json
{
  "id": 1,
  "code": "USD",
  "type_id": 1
}
```

### Optional properties

None

### Relations

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

| Entity                                                                                    | Mapping property | Description                                                      |
| ----------------------------------------------------------------------------------------- | ---------------- | ---------------------------------------------------------------- |
| [`CSPR Rate`](https://docs.cspr.cloud/rest-api/cspr-rate)                                 | `currency_id`    | Native CSPR rate are returned for different currencies           |
| [`Fungible token rate`](https://docs.cspr.cloud/rest-api/fungible-token-rate)             | `currency_id`    | Fungible token rates are returned for different currencies       |
| [`Fungible token daily rate`](https://docs.cspr.cloud/rest-api/fungible-token-daily-rate) | `currency_id`    | Fungible token daily rates are returned for different currencies |

## Endpoints

The `Currency` entity has the following endpoints:

* [Get currencies](https://docs.cspr.cloud/rest-api/currency/get-currencies)
