Getting started

Live exchange rates

The live endpoint returns the most recent exchange rates for a given set of currencies. The base currency is the currency you’re converting from, while the target currency or currencies are what you’re converting to.

Convert exchange rates

The convert endpoint is similar to the live endpoint but allows you to convert an arbitrary amount from one currency to another.

Historical exchange rates (beta)

The historical endpoint functions almost exactly like the live endpoint, except it requires a date parameter and returns the exchange rates for that specific date for a given set of currencies.

REST

The Exchange Rates API, like all of Abstract’s APIs, is organized around REST. It is designed to use predictable, resource-oriented URLs and to use HTTP status codes to indicate errors.

HTTPS

The Exchange Rates API requires all communications to be secured with TLS 1.2 or greater.

API Versions

All of Abstract’s APIs are versioned. The Exchange Rates API is currently on Version 1.

Your API Key

Your API key is your unique authentication key to be used to access Abstract’s Exchange Rates API. Note that each of Abstract’s APIs has a unique API key, so you will need different keys to access the Exchange Rates and Email Validation APIs, for example. To authenticate your requests, you will need to append your API key to the base URL.

Code samples and libraries

Please see the top of this page for code samples for these languages and more. If we’re missing a code sample, or if you’d like to contribute a code sample or library in exchange for free credits, email us at: team@abstractapi.com

Response and error codes

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.

CodeTypeDetails
200OKEverything worked as expected.
204OKTheir is no location data for the submitted IP.
400Bad requestBad request.
401UnauthorizedThe request was unacceptable. Typically due to the API key missing or incorrect.
422Quota reachedThe request was aborted due to insufficient API credits. (Free plans)
429Too many requestsThe request was aborted due to the number of allowed requests per second being reached. This happens on free plans as requests are limited to 1 per second.
500Internal server errorThe request could not be completed due to an error on the server side.
503Service unavailableThe server was unavailable.

Currency codes of supported currencies

Below are the ISO 4217 codes of supported currencies. If you’d like us to support a currency that’s not listed below, please contact hello@abstractapi.com

Currency codeCurrency name
ARSArgentine Peso
AUDAustralian Dollar
BCHBitcoin Cash
BGNBulgarian Lev
BNBBinance Coin
BRLBrazilian Real
BTCBitcoin
CADCanadian Dollar
CHFSwiss Franc
CNYChinese Yuan
CYPCypriot Pound
CZKCzech Republic Koruna
DKKDanish Krone
DOGEDogecoin
DZDAlgerian Dinar
EEKEstonian Kroon
ETHEthereum
EUREuro
GBPBritish Pound Sterling
GRDGreek Drachma
HKDHong Kong Dollar
HRKCroatian Kuna
HUFHungarian Forint
IDRIndonesian Rupiah
ILSIsraeli New Sheqel
INRIndian Rupee
ISKIcelandic Króna
JPYJapanese Yen
KRWSouth Korean Won
LTCLitecoin
LTLLithuanian Litas
LVLLatvian Lats
MADMoroccan Dirham
MTLMaltese Lira
MXNMexican Peso
MYRMalaysian Ringgit
NOKNorwegian Krone
NZDNew Zealand Dollar
PHPPhilippine Peso
PLNPolish Zloty
RONRomanian Leu
RUBRussian Ruble
SEKSwedish Krona
SGDSingapore Dollar
SITSlovenian Tolar
SKKSlovak Koruna
THBThai Baht
TRYTurkish Lira
TWDNew Taiwan Dollar
USDUnited States Dollar
XRPRipple
ZARSouth African Rand