# Get Currency

**Endpoint**

`GET/v2/currency/{iso}`

**Link**

{% embed url="<https://stagep.tst-apidmndelss.com/openapi/v2.html#/operations/Currency_Get>" %}

### **Request**

#### **Path Parameters**

| Parameter | Type     | Description                            | Required | Example |
| --------- | -------- | -------------------------------------- | -------- | ------- |
| **`iso`** | `string` | **ISO 4217 currency code** (3-letter). | Yes      | `"USD"` |

#### **Headers**

| Key             | Value              | Required |
| --------------- | ------------------ | -------- |
| `Authorization` | `Bearer <JWT>`     | Yes      |
| `Accept`        | `application/json` | Yes      |

***

### **Response (200 OK)**

Returns a currency object with detailed information.

#### **Response Fields**

| Field           | Type      | Description                                     | Example       |
| --------------- | --------- | ----------------------------------------------- | ------------- |
| **`iso`**       | `string`  | **ISO 4217 currency code** (3-letter).          | `"USD"`       |
| **`name`**      | `string`  | **Full currency name**.                         | `"US Dollar"` |
| **`isCrypto`**  | `boolean` | `true` for cryptocurrencies.                    | `false`       |
| **`isDefault`** | `boolean` | `true` for system default currency.             | `true`        |
| **`rate`**      | `number`  | **Exchange rate** relative to default currency. | `1.0`         |

**Example Response:**

json

```
{
  "iso": "USD",
  "name": "US Dollar",
  "isCrypto": false,
  "isDefault": true,
  "rate": 1.0
}
```

***

### **Examples**

#### **Request**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/currency/USD' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

#### **Crypto Currency Example**

**Request:**

bash

```
curl -X GET 'https://stagep.tst-apidmndelss.com/v2/currency/BTC' \
  -H 'Authorization: Bearer eyJhbGci...wNLGA' \
  -H 'Accept: application/json'
```

**Response:**

json

```
{
  "iso": "BTC",
  "name": "Bitcoin",
  "isCrypto": true,
  "isDefault": false,
  "rate": 0.000025
}
```

***

### **Error Responses**

1. **Currency Not Found**:

   json

   ```
   {
     "error": "Currency not found: XYZ"
   }
   ```
2. **Invalid ISO Code**:

   json

   ```
   {
     "error": "Invalid currency code format. Must be 3 letters."
   }
   ```

***

### **Notes**

* **Rate Basis**:
  * Exchange rates are relative to the **default currency** (where `isDefault: true`).
  * Example: If EUR is default, USD rate `1.07` means 1 EUR = 1.07 USD.
* **Crypto Currencies**:
  * Use standard cryptocurrency ticker symbols (e.g., `BTC`, `ETH`, `USDT`).
  * Rates update frequently due to market volatility.
* **Default Currency**:
  * Only one currency can be marked as default in the system.
  * Used as base for accounting and reporting.

Real request Example

```postman_json
Authorization:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjE2NCwiZXhwIjoxNzYxMTMwNDc2LCJrZXkiOiI1Y2ZiOGZjN2RmYjk4ZjVkYmIyZTgwNTVkZWFhN2U2Zjk4MzEyYmE3Iiwib3RwX3ZlcmlmaWVkIjpmYWxzZX0.llC0NQeIZUymVFKIHI7d1q_IFW39qD0QYd7i0KWKxyA
code*: USD
```

Real response example

200 OK

```postman_json
{
  "code": "USD",
  "name": "USD",
  "isCrypto": false,
  "isDefault": true,
  "rate": 1
}
```

<br>


---

# Agent Instructions: 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.delos.financial/currency/get-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.
