# Reading exchange rates

## Read exchange rate

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

This endpoint returns **indicative mid-market** exhange 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](https://docs.txn.io/exchange/creating-quote "mention") 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="supported-currency-pairs">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="supported-currency-pairs">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 %}
