> For the complete documentation index, see [llms.txt](https://docs.cspr.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cspr.cloud/rest-api/currency.md).

# Currency

`Currency` entity represents currencies used by [CSPR Rate](/rest-api/cspr-rate.md) and [Fungible token rate](/rest-api/fungible-token-rate.md) 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`](/rest-api/cspr-rate.md)                                 | `currency_id`    | Native CSPR rate are returned for different currencies           |
| [`Fungible token rate`](/rest-api/fungible-token-rate.md)             | `currency_id`    | Fungible token rates are returned for different currencies       |
| [`Fungible token daily rate`](/rest-api/fungible-token-daily-rate.md) | `currency_id`    | Fungible token daily rates are returned for different currencies |

## Endpoints

The `Currency` entity has the following endpoints:

* [Get currencies](/rest-api/currency/get-currencies.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cspr.cloud/rest-api/currency.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
