# Get Current Conversion Rate

Request to retrieve the current conversion rate. You can specify one of the following values: TRX or USDT.

To perform the request, the `currency` parameter must be passed directly in the URL endpoint.

<mark style="color:blue;">GET</mark> [<mark style="color:$primary;">https://app.goodpayments.io/v1/api/rates?currency=TRX</mark>](https://app.goodpayments.io/v1/api/rates?currency=TRX) &#x20;

### Headers

| Name            | Type   | Description             | Example                                                          |
| --------------- | ------ | ----------------------- | ---------------------------------------------------------------- |
| Authorization\* | string | Unique Merchant API Key | 94a48138b1f41b9cdb3e12c2ff0c7cbe1c7a5f50a311a5054b903cad84215662 |

### **Request Body**

This request does not require any parameters in the request body. All necessary parameters are included in the URL endpoint.

### **Request** **Example**

```yaml
curl -X 'GET' \
  'https://app.goodpayments.io/v1/api/rates?currency=TRX' \
  -H 'accept: application/json' \
  -H 'Authorization: 94a48138b1f41b9cdb3e12c2ff0c7cbe1c7a5f50a311a5054b903cad84215662'
```

### Response Parameters

| Name     | Type   | Description                                                                                | Example    |
| -------- | ------ | ------------------------------------------------------------------------------------------ | ---------- |
| currency | string | <p>Token. Possible values:</p><ul><li><code>TRX</code></li><li><code>USDT</code></li></ul> | TRX        |
| rate     | number | Up-to-date conversion rate                                                                 | 0.27700958 |
| fee      | number | The service fee charged when topping up the merchant’s balance in USDT                     | 0.06       |

### Response Example

{% tabs %}
{% tab title="200 Success" %}

```json
{
  "currency": "TRX",
  "rate": 0.27700958,
  "fee": 0
}
```

{% endtab %}

{% tab title="403 Authentication credentials were not provided" %}

```json
{
  "detail": "Authentication credentials were not provided."
}
```

{% endtab %}

{% tab title="404 Currency not found" %}

```json
{
  "detail": "Currency not found"
}
```

{% endtab %}
{% endtabs %}

### **Possible Errors**

If the request does not contain a valid API key in the header or IP address is not in Whitelist, the server will return a **403** response.

If an invalid token is specified in the request, the server returns a **404** response.<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://goodpayments.gitbook.io/docs/api-reference/api-methods-overview-request-response-structure/get-current-conversion-rate.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.
