Skip to main content
GET
Convert exchange rates

Getting started

Base URL

Validation endpoint

The convert endpoint requires your API key, a base currency, and a target parameter to perform currency conversions.
This successful request converts 1 EUR to USD using the most current exchange rate:

Request parameters

String
required
Your unique API key. Note that each user has unique API keys for each of Cleariflow APIs, so your Exchange Rates API key will not work for your IP Geolocation API, for example.
String
required
The base currency used to get the latest exchange rate(s) for. Uses the ISO 4217 currency standard (e.g., USD for United States Dollars), like all currency parameters in this API.
String
required
The target currency or currencies to get the exchange rate of versus the base currency. Like the base parameters, any currency passed here follows the ISO 4217 standard. Note that unlinke the other endpoints, convert only accepts one target currency at a time.
String
The historical date you’d like to get rates from, in the format of YYYY-MM-DD. If you leave this blank, it will use the latest available rate(s).
Float
The amount of the base currency you would like to convert to the target currency.

Response parameters

The API response is returned in a universal and lightweight JSON format.
String
The base currency used to get the exchange rates.
String
The target currency that the base_amount was converted into.
String
The date the currencies were pulled from, per the successful request.
Float
The amount of the base currency from the request.
Float
The amount of the target currency that the base_amount has been converted into.
Float
The exchange rate used to convert the base_amount from the base currency to the target currency.

Query Parameters

api_key
string
required

Your unique API key for authentication

base
string
default:EUR

The base currency used to get the latest exchange rate(s) for. Uses the ISO 4217 currency standard

target
string
required

The target currency to convert to. Only one currency is allowed for conversion.

base_amount
number
default:1

The amount of the base currency you would like to convert to the target currency

date
string<date>

The historical date you'd like to get rates from, in the format of YYYY-MM-DD. If not specified, the latest available rates will be used.

Response

Successful response

base
string
required

The base currency used to get the exchange rates

Example:

"EUR"

target
string
required

The target currency that the base_amount was converted into

Example:

"USD"

date
string<date>
required

The date the currencies were pulled from, per the successful request

Example:

"2024-01-01"

base_amount
number
required

The amount of the base currency from the request

Example:

1

converted_amount
number
required

The amount of the target currency that the base_amount has been converted into

Example:

0.85

exchange_rate
number
required

The exchange rate used to convert the base_amount from the base currency to the target currency

Example:

0.85

last_updated
integer
required

The Unix timestamp of when the returned data was last updated

Example:

1704067200