GET
/
v1
/
convert

Getting started

Base URL

https://exchange-rates.abstractapi.com/v1/convert

Validation endpoint

Along with your API key and a base currency, the convert endpoint requires a target parameter.

https://exchange-rates.abstractapi.com/v1/convert
? api_key = YOUR_UNIQUE_API_KEY
& base = USD
& target = EUR

This was a successful request and returns a converted amount of 1 USD at its most updated EUR exchange rate.

Request parameters

api_key
String
required

Your unique API key. Note that each user has unique API keys for each of Abstract’s APIs, so your Exchange Rates API key will not work for your IP Geolocation API, for example.

base
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.

target
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.

date
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).

base_amount
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.

base
String

The base currency used to get the exchange rates.

target
String

The target currency that the base_amount was converted into.

date
String

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

base_amount
Float

The amount of the base currency from the request.

converted_amount
Float

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

exchange_rate
Float

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