# Pulling our FX Rates

**Via API**

The following command authenticates you with your API credentials that you use for payment processing and returns the FX Rate upon successful authentication

**Command-line example with curl**

```
https://reports.primeiropay.com/fx?username=XXXXXXX&merchantId=XXXXXX&password=XXXXX
```

if the authentication fails, you will receive:

```
{
   "reason" : "INVALID_USER_AUTHENTICATION",
   "message" : "Failed to authenticate principal, user and/or password invalid"
}
```

If the authentication is successful you will be returned with the current valid FX Rates:

**Please note that only your settlement currency pair is being returned. If you wish to change your settlement currency, please contact your Account Manager.**

```
{
  "rate" : [ {
    "currency_pair" : "BRLUSD",
    "rate" : "3.795674",
    "valid_until" : "2015-01-15 15:00:00.0"
  } ]
}
```

{% file src="/files/-MGhfquobv7ViRjEPcAb" %}
Pulling FX Rates Json Request
{% endfile %}


---

# 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://developers.primeiropay.com/pulling-our-fx-rates-1.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.
