---
title: "exRateOfExchange"
canonical: "https://help.agiloft.com/space/HELP/65438446/exRateOfExchange"
format: markdown
---
The RateOfExchange formula outputs the exchange rate between two currencies, either now or using a historic exchange rate based on a date field. The exchange rates are published by the European Central Bank.

#### Syntax

`RateOfExchange("From_Currency","To_Currency",[date])`

#### Examples

| **Example formula** | **Output** |
| --- | --- |
| `RateOfExchange("USD", "EUR")` | Result is the current exchange rate between US dollars and Euros. |
| `RateOfExchange("JPY", "USD", $payment_date)` | Results in the exchange rate between Japanese yen and US dollars on the date of the transaction, $payment_date. |

#### Information

Two currency conversion formulas are provided using an open-source API to convert an amount between currencies or return the exchange rate. Currency conversion formulas use the open-source JSON API [Fixer.io](http://fixer.io)  to obtain exchange rates published by the European Central Bank. These rates are updated daily at approximately 4pm Central European Time (CET). If the date parameter is not specified, the current exchange rate is used.

The CLM Template uses a free API key from [Fixer.io](http://fixer.io) to make requests to their API. You must replace the current access key with a new, free one you can easily download from the Fixer.io website. If you intend to use the currency conversion for production environments, then we recommend purchasing a paid version from Fixer.io instead of using the free version.

After obtaining a new API key from Fixer.io, log in to the KB and update the [Fixer.io Service Access Key](https://wiki.agiloft.com/display/PROD/Global+Variables+List#GlobalVariablesList-Fixer.ioServiceAccessKey) global variable through **Setup** > **System** > **Manage Global variables** to make use of the new key. If you plan to use the Currencies table to manage currency conversion, also consider enabling the time-based rule in the Currencies table to update exchange rates daily, or modifying the rule to adjust the rate of updates.

#### Fixer.io Variable

Once you have obtained a new API access key, the value must be set in the [Fixer.io Service Access Key](https://agiloft-public.atlassian.net/wiki/spaces/HELP/pages/43713942/Global+Variables+List#Fixer.ioServiceAccessKey) global variable.