# Reading exchange rates

## Read exchange rate

<mark style="color:green;">`GET`</mark> `/api/public/v1/exchange/rate`

This endpoint returns **indicative mid-market** exchange rate for a specified currency pair.

You cannot specify quantity as it is defaulted to 1.

For a precise price estimation based on the amount, use [Creating quote](/exchange/creating-quote.md) instead.

**Headers**

| Name          | Value                      |
| ------------- | -------------------------- |
| Content-Type  | `application/vnd.api+json` |
| Authorization | `Bearer <api_token>`       |

**Query parameters**

<table><thead><tr><th>Name</th><th width="105">Type</th><th>Description</th></tr></thead><tbody><tr><td>sell_currency_code</td><td>string</td><td>Currency code to sell. E.g. EUR. Refer to <a href="/pages/brqdFdtRYeQJbmkSBxHi">Supported currency pairs</a>.</td></tr><tr><td>buy_currency_code</td><td>string</td><td>Currency code to buy. E.g. USDT. Refer to <a href="/pages/brqdFdtRYeQJbmkSBxHi">Supported currency pairs</a>.</td></tr></tbody></table>

**Response**

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

```json
{
  "data": {
    "id": "USDTEUR/10.0USDT",
    "type": "exchangeRates",
    "attributes": {
      "baseCurrencyCode": "USDT",
      "quoteCurrencyCode": "EUR",
      "direction": "mid_market_rate",
      "price": "0.8716",
      "quantity": "10.0"
    }
  },
  "meta": {},
  "jsonapi": {
    "version": "1.0"
  }
}
```

{% endtab %}

{% tab title="HTTP 422" %}

```json
{
  "errors": [
    {
      "status": 422,
      "title": "Currency pair not supported",
      "code": "currency_pair_not_supported"
    }
  ]
}
```

{% endtab %}
{% endtabs %}


---

# 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.txn.io/exchange/reading-exchange-rates.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.
