https://currency.abstractapi.com/v1/latest
? api_key = YOUR_UNIQUE_API_KEY
& base = USD
{
"base": "USD",
"last_updated_unix": "1593614038",
"last_updated_utc": "Wed, 01 Jul 2020 14:33:58 +0000",
"exchange_rate": {
"EUR": 0.889758,
"CAD": 1.35676,
"AUD": 1.44753,
"GBP": 0.807175,
"CHF": 0.946451,
"CNY": 7.06409,
...
...
}
}
The Exchange Rate and Currency Conversion API, like all of Abstract's APIs such as the VAT validation API, is organized around REST. It is designed to use predictable, resource-oriented URL's and to use HTTP status codes to indicate errors.
The Exchange Rate API requires all communications to be secured TLS 1.2 or greater.
All of Abstract's API are versioned. The Gender API is currently on Version 1.
Your API key is your unique authentication key to be used to access Abstract's Exchange Rate API. Note that each of Abstract's API has a unique API key, so you will need different keys to access the Exchange Rate and IP Geolocation APIs, for example. To authenticate your requests, you will need to append your API key to the base URL.
https://currency.abstractapi.com/v1/
Abstract's Exchange Rate and Currency Conversion API contains two main endpoints for accessing currency and exchange rate data:
The /latest/ endpoint returns the most recent exchange rate for a base currency. If no target currency or currencies are specified, then all currencies in our database are returned. You can see a full list of supported currencies at the bottom of this documentation.
https://currency.abstractapi.com/v1/latest
? api_key = YOUR_UNIQUE_API_KEY
& base = USD
This was a successful request, and because no target currency or currencies were included, the exchange rate of all available currencies were included in the response:
{
"base": "USD",
"last_updated_unix": "1593614038",
"last_updated_utc": "Wed, 01 Jul 2020 14:33:58 +0000",
"exchange_rate": {
"EUR": 0.889758,
"CAD": 1.35676,
"AUD": 1.44753,
"GBP": 0.807175,
"CHF": 0.946451,
"CNY": 7.06409,
...
...
}
}
PARAMETER
TYPE
DETAILS
api_key required
String
Your unique API key. Note that each user has unique API keys for each of Abstract's APIs, so your Exchange Rate API key will not work for as your IP Geolocation API key, for example.
base required
String
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. You can see a full list of supported currencies here.
target
String
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. If multiple currencies are passed in the target, they should be separated by commas (e.g., &target=EUR,CAD,AUD)
The API response is returned in a universal and lightweight JSON format.
PARAMETER
TYPE
DETAILS
base
String
The base currency used to get the exchange rates.
last_updated_unix
String
The Unix timestamp of when the returned data was last updated.
last_updated_utc
String
The UTC timestamp of when the returned data was last updated.
exchange_rate
Object
A JSON Object containing each of the target currency as the key and its exchange rate versus the base currency as that key's value.
Rather than returning the latest exchange rate for all currencies, you can specify one or more particular currencies you'd like the latest exchange rate for. Below is a sample request to get the latest exchange rates specifying the United States Dollar (USD) as the base currency and the Singapore Dollar (SGD), Malaysian Ringgit (MYR), and Indonesian Rupiah (INR) as the target currencies.
https://currency.abstractapi.com/v1/latest
? api_key = YOUR_UNIQUE_API_KEY
& base = USD
& target = SGD,MYR,IDR
The request was valid and successful, and so it returns the following:
{
"base": "USD",
"last_updated_unix": "1593614038",
"last_updated_utc": "Wed, 01 Jul 2020 14:33:58 +0000",
"exchange_rate": {
"SGD": 1.39392,
"MYR": 4.28634,
"IDR": 14312.03
}
}
Each request to the /latest/ endpoint counts as a single use of the API, regardless of how many target currencies are specified or not.
The /convert/ endpoint is the most powerful and flexible endpoint in Abstract's Exchange Rate and Currency Conversion API. At its core, it converts one currency (the base currency) into an equivalent amount of another currency (the target currency). Its power comes from the ability to set specific amounts to convert, as well as historical dates and even time series to get the exchange rate of.
Below is a very simple example of the /convert/ endpoint in which a specific amount of United States Dollars (USD) ($150) is converted to Euros.
https://currency.abstractapi.com/v1/convert
? api_key = YOUR_UNIQUE_API_KEY
& base = USD
& target = EUR
& base_amount = 150
This was a successful request, and the converted because no target currency or currencies were included, the exchange rate of all available currencies were included in the response:
{
"base": "USD",
"target": "EUR",
"base_amount": 150,
"converted_amount": 133.19,
"exchange_rate": 0.887417,
"last_updated_unix": "1593614038",
"last_updated_utc": "Wed, 01 Jul 2020 14:33:58 +0000",
}
PARAMETER
TYPE
DETAILS
api_key required
String
Your unique API key. Note that each user has unique API keys for each of Abstract's APIs, so your Exchange Rate API key will not work for as your IP Geolocation API key, for example.
base required
String
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. You can see a full list of supported currencies here.
target required
String
The target currency to get the exchange rate of versus the base currency. Like the base parameters, any currency passed here follows the ISO 4217 standard.
base_amount
Float
The amount of the base currency to convert into the target currency. If this parameter is not passed, it will default to 1.
date
String
The date to use in getting the base to target exchange rate. Must be in the format of YYYY-MM-DD. If this is parameter is not passed, it will default to the current day and get the latest available rate.
The API response is returned in a universal and lightweight JSON format.
PARAMETER
TYPE
DETAILS
base
Float
The base currency used to get the exchange rates.
target
Float
The target currency used to get the exchange rates.
base_amount
Float
If a base_amount to convert is passed as a request parameter, it is returned here.
converted_amount
Float
The base_amount of the base currency converted into the target currency.
exchange_rate
Float
The exchange rate used to convert the base currency into the target currency.
date
String
If a date is passed as a request parameter, it is returned here.
last_updated_unix
String
The Unix timestamp of when the returned data was last updated.
last_updated_utc
Object
The UTC timestamp of when the returned data was last updated.
If you do not specify a base_amount in the request, the API will default to 1, which effectively returns the exchange rate from the base to the target currencies.
https://currency.abstractapi.com/v1/convert
? api_key = YOUR_UNIQUE_API_KEY
& base = USD
& target = SGD
The request was valid and successful, and so it returns the following:
{
"base": "USD",
"target": "SGD",
"base_amount": 1,
"converted_amount": 1.39367,
"exchange_rate": 1.39367,
"last_updated_unix": "1593614038",
"last_updated_utc": "Wed, 01 Jul 2020 14:33:58 +0000",
}
If you specify a date in the request, the API will return the historical rate for that particular day.
https://currency.abstractapi.com/v1/convert
? api_key = YOUR_UNIQUE_API_KEY
& base = USD
& target = SGD
& date = 2020-01-01
The request was valid and successful, and so it returns the following:
{
"base": "USD",
"target": "SGD",
"target": "2020-01-01",
"base_amount": 1,
"converted_amount": 1.34827,
"exchange_rate": 1.34827,
"last_updated_unix": "1593614038",
"last_updated_utc": "Wed, 01 Jul 2020 14:33:58 +0000",
}
You can combine this use of the date parameter with that of the base_amount, to determine how much a specific amount of the base currency converted to of the target currency at a specified date in the past.
https://currency.abstractapi.com/v1/convert
? api_key = YOUR_UNIQUE_API_KEY
& base = USD
& target = SGD
& date = 2020-01-01
& base_amount = 500
If you specify a date in the request, the API will return the historical rate for that particular day.
{
"base": "USD",
"target": "SGD",
"target": "2020-01-01",
"base_amount": 500,
"converted_amount": 674.14,
"exchange_rate": 1.34827,
"last_updated_unix": "1593614038",
"last_updated_utc": "Wed, 01 Jul 2020 14:33:58 +0000",
}
Whenever you make a request that fails for some reason, an error is returned also in the JSON format. The errors include an error code and description, which you can find in detail below.
CODE
TYPE
DETAILS
200
OK
Everything worked as expected.
400
Bad request
Bad request
401
Unauthorized
The request was unacceptable. Typically due to the API key missing or incorrect.
500
Internal Server Error
The request could not be completed due to an error on the server side.
503
Service Unavailable
The server was unavailable.
We source our data from multiple trusted providers to ensure the exchange rates and currency conversion data we provide to you is as close to market as possible. To do this, we collect exchange rate data from multiple central banks (such as the European Central Bank and the Bank of Japan) and process them to provide the latest rates.
Our core data is updated every 60 seconds for most currencies and currency pairs. However, you will have different levels of accuracy based on your plan. For example, the data accessible via our free plan is typically updated every 45-60 minutes, while our paid plans have access to currency data that's updated every 60 seconds. For more details, please create an account and view our pricing page.
We support the following currencies: Afghan afghani (AFN), Euro (EUR), Albanian lek (ALL), British pound[F] (GBP), Algerian dinar (DZD), Angolan kwanza (AOA), Eastern Caribbean dollar (XCD), Argentine peso (ARS), Armenian dram (AMD), Aruban florin (AWG), Saint Helena pound (SHP), Australian dollar (AUD), Azerbaijani manat (AZN), Bahamian dollar (BSD), Bahraini dinar (BHD), Bangladeshi taka (BDT), Barbadian dollar (BBD), Belarusian ruble (BYN), Belize dollar (BZD), West African CFA franc (XOF), Bermudian dollar (BMD), Bhutanese ngultrum (BTN), Indian rupee (INR), Bolivian boliviano (BOB), Bosnia and Herzegovina convertible mark (BAM), Botswana pula (BWP), Brazilian real (BRL), United States dollar (USD), Brunei dollar (BND), Singapore dollar (SGD), Bulgarian lev (BGN), Burundian franc (BIF), Cambodian riel (KHR), Central African CFA franc (XAF), Canadian dollar (CAD), Cape Verdean escudo (CVE), Cayman Islands dollar (KYD), Chilean peso (CLP), Chinese yuan (CNY), Colombian peso (COP), Comorian franc (KMF), Congolese franc (CDF), New Zealand dollar (NZD), Costa Rican colón (CRC), Croatian kuna (HRK), Cuban peso (CUP), Cuban convertible peso (CUC), Netherlands Antillean guilder (ANG), Czech koruna (CZK), Danish krone (DKK), Djiboutian franc (DJF), Dominican peso (DOP), Egyptian pound (EGP), Eritrean nakfa (ERN), Swazi lilangeni (SZL), South African rand (ZAR), Ethiopian birr (ETB), Falkland Islands pound (FKP), Fijian dollar (FJD), CFP franc (XPF), Gambian dalasi (GMD), Georgian lari (GEL), Ghanaian cedi (GHS), Gibraltar pound (GIP), Guatemalan quetzal (GTQ), Guinean franc (GNF), Guyanese dollar (GYD), Haitian gourde (HTG), Honduran lempira (HNL), Hong Kong dollar (HKD), Hungarian forint (HUF), Icelandic króna (ISK), Indonesian rupiah (IDR), Iranian rial (IRR), Iraqi dinar (IQD), Manx pound (IMP[G]), Israeli new shekel (ILS), Jamaican dollar (JMD), Japanese yen (JPY), Jordanian dinar (JOD), Kazakhstani tenge (KZT), Kenyan shilling (KES), North Korean won (KPW), South Korean won (KRW), Kuwaiti dinar (KWD), Kyrgyzstani som (KGS), Lao kip (LAK), Lebanese pound (LBP), Lesotho loti (LSL), Liberian dollar (LRD), Libyan dinar (LYD), Swiss franc (CHF), Macanese pataca (MOP), Malagasy ariary (MGA), Malawian kwacha (MWK), Malaysian ringgit (MYR), Maldivian rufiyaa (MVR), Mauritanian ouguiya (MRU), Mauritian rupee (MUR), Mexican peso (MXN), Moldovan leu (MDL), Mongolian tögrög (MNT), Moroccan dirham (MAD), Mozambican metical (MZN), Burmese kyat (MMK), Namibian dollar (NAD), Nepalese rupee (NPR), Nicaraguan córdoba (NIO), Nigerian naira (NGN), Macedonian denar (MKD), Turkish lira (TRY), Norwegian krone (NOK), Omani rial (OMR), Pakistani rupee (PKR), Panamanian balboa (PAB), Papua New Guinean kina (PGK), Paraguayan guaraní (PYG), Peruvian sol (PEN), Philippine peso (PHP), Polish złoty (PLN), Qatari riyal (QAR), Romanian leu (RON), Russian ruble (RUB), Rwandan franc (RWF), Samoan tālā (WST), São Tomé and Príncipe dobra (STN), Saudi riyal (SAR), Serbian dinar (RSD), Seychellois rupee (SCR), Sierra Leonean leone (SLL), Solomon Islands dollar (SBD), Somali shilling (SOS), South Sudanese pound (SSP), Sri Lankan rupee (LKR), Sudanese pound (SDG), Surinamese dollar (SRD), Swedish krona (SEK), Syrian pound (SYP), New Taiwan dollar (TWD), Tajikistani somoni (TJS), Tanzanian shilling (TZS), Thai baht (THB), Tongan paʻanga (TOP), Trinidad and Tobago dollar (TTD), Tunisian dinar (TND), Turkmenistan manat (TMT), Tuvaluan dollar (TVD[G]), Ugandan shilling (UGX), Ukrainian hryvnia (UAH), Russian ruble (RUB), United Arab Emirates dirham (AED), United States dollar (USD), Uruguayan peso (UYU), Uzbekistani soʻm (UZS), Vanuatu vatu (VUV), Venezuelan bolívar soberano (VES), Vietnamese đồng (VND), Yemeni rial (YER), and Zambian kwacha (ZMW). In addition we support Bitcoin, Ethereum, Litecoin, gold, and silver.
June 1, 2020
-
Improved update time and reliability for certain Southeast Asia currencie
May 30, 2020
-
Dataset of historical rates extended by decades to the 1990s in many cases
Each of our API's has a free plan as well as several paid options, which offer a greater number of requests, a higher level of data quality, and greater speed for higher prices. Please see the page above or sign into your account to view pricing for each API.
Absolutely! We want you to try before you buy. Each of our API's has a free tier with a generous usage allowance for you to try the product out and verify that the speed and data quality work for you.
We use Stripe to accept payment via major debit and credit cards (Visa, Mastercard, American Express). If you cannot use those payment methods, then contact us at team at abstractapi.com to arrange for an alternative payment method.
Yes, you can upgrade or downgrade your subscription at any time by visiting your dashboard. If you upgrade in the middle of a billing cycle, you will be charged a pro-rated amount for your new plan through the end of the billing cycle.
Yes, all of our subscriptions are month to month. You can cancel at any time, and you will not be charged again at the end of your billing cycle.
You can cancel your subscription at any time from your dashboard. Once canceled, your subscription will be active until the end your current billing cycle, and then it will be automatically moved to the free plan.
If your API usage exceeds the monthly limit set by your plan, then you will be charged a fee for each call over your limit. At the end of your billing period, your usage will reset again.
We do offer enterprise plans with custom features and pricing in limited circumstances. If our public pricing plans don't work for you, then contact us (team at abstractapi.com) and we'll work something out.
While we don't normally offer discounts, we do make exceptions for certain types of users and use cases. If you are a student or are engaged in academic work, or are working on a non-profit or open source project, we're happy to offer you discounts for our API's. Just email us at team at abstractapi.com.
All of our plans are currently paid month to month. We will be launching annual plans at a discount soon. If you're interested in an annual plan in the meantime, just contact us and we'll set you up.
We will typically attempt to charge your payment method up to three times after it fails. If we're still unable to collect payment, then your subscription will be automatically canceled and you'll be moved to the free plan.
Yes, a paid tier of our API may be used in conjunction with a commercial project. The free tiers of our API's may not be used in commercial projects.