Documentation
    Amazon Web Services
    Microsoft Azure
    RapidAPI
    APILayer
Last Update: 2024-02-05

Currency Exchange Historical Data


Table of Content


Subscribe on AWS Marketplace
Dataset Structure
Convert between currencies
List of all available currencies

Subscribe on AWS Marketplace


1
. Visit our listings page on AWS Marketplace.

2. Access the product in AWS Data Exchange by clicking on 'Continue to subscribe'.

3  To gain access to the dataset, click on 'Subscribe' at the bottom of the page.

Dataset Structure


The dataset comprises 141 CSV files, each containing the end-of-day exchange rates for a given currency relative to the US dollar. For instance, the file USDEUR.csv contains the historical exchange rates between the US dollar and the Euro.

Example:

30.04.2023,0.90822
29.04.2023,0.8987
28.04.2023,0.8987
27.04.2023,0.9065
26.04.2023,0.90539
25.04.2023,0.9108
24.04.2023,0.90435
23.04.2023,0.90975

Converting Between Currencies

USD as Base Currency: All exchange rates are quoted relative to the US Dollar (USD). This means each record indicates how much one unit of foreign currency is equivalent to in USD.

Conversion Formula with USD as Target Currency: To convert a value from a foreign currency (e.g., EUR, JPY) to USD, use the formula 1/rate.

For example, if the EUR/USD rate is 0.85, then 1 Euro is equivalent to 1/0.85 USD.

Cross-Currency Conversion Formula: To calculate the exchange rate from one non-USD currency to another (e.g., EUR to JPY), use the formula 1/(rate of USD to EUR/rate of USD to JPY).

Below is a Python script for converting between the Euro (EUR) and Canadian Dollar (CAD) on the 24th of April, 2023:

import csv
base = "EUR"
target = "CAD"
date = "24.04.2023"


# Fetch base currency rate against USD
base_data = []
with open("USDEUR.csv", "r") as f:
   

reader = csv.reader(f)
   
data = list(reader)
base_rate = float(next(row for row in data if row[0] == date)[1])
# Fetch target currency rate against USD
target_data = []
with open("USDCAD.csv", "r") as f:
   reader = csv.reader(f)   
data = list(reader)
target_rate = float(next(row for row in data if row[0] == date)[1])
# Calculate conversion rate from base to target currency
conversion_rate = 1 / (base_rate / target_rate)
print(f"{conversion_rate:.4f}")
Supported currencies


Below is a full list of all available currencies and their corresponding currency codes supported by our dataset:


AED, United Arab Emirates dirham
AFN, Afghan afghani
ALL, Albanian lek
AMD, Armenian dram
ANG, Netherlands Antillean guilder
AOA, Angolan kwanza
ARS, Argentine peso
AUD, Australian dollar
AWG, Aruban florin
AZN, Azerbaijani manat
BAM, Bosnia and Herzegovina convertible mark
BBD, Barbadian dollar
BDT, Bangladeshi taka
BGN, Bulgarian lev
BHD, Bahraini dinar
BIF, Burundian franc
BMD, Bermudian dollar
BND, Brunei dollar
BOB, Bolivian boliviano
BRL, Brazilian real
BSD, Bahamian dollar
BTN, Bhutanese ngultrum
BWP, Botswana pula
BYN, Belarusian ruble
BZD, Belize dollar
CAD, Canadian dollar
CDF, Congolese franc
CHF, Swiss franc
CLP, Chilean peso
CNY, Chinese yuan
COP, Colombian peso
CRC, Costa Rican colón
CUP, Cuban peso
CVE, Cape Verdean escudo
CZK, Czech koruna
DJF, Djiboutian franc
DKK, Danish krone
DOP, Dominican peso
DZD, Algerian dinar
EGP, Egyptian pound
ETB, Ethiopian birr
EUR, Euro
FJD, Fijian dollar
GBP, British pound
GEL, Georgian lari
GHS, Ghanaian cedi
GMD, Gambian dalasi
GNF, Guinean franc
GTQ, Guatemalan quetzal
GYD, Guyanese dollar
HKD, Hong Kong dollar
HNL, Honduran lempira
HTG, Haitian gourde
HUF, Hungarian forint
IDR, Indonesian rupiah
ILS, Israeli new shekel
INR, Indian rupee
IQD, Iraqi dinar
IRR, Iranian rial
ISK, Icelandic króna
JMD, Jamaican dollar
JOD, Jordanian dinar
JPY, Japanese yen
KES, Kenyan shilling
KGS, Kyrgyzstani som
KHR, Cambodian riel
KMF, Comorian franc
KRW, South Korean won
KWD, Kuwaiti dinar
KYD, Cayman Islands dollar
KZT, Kazakhstani tenge
LAK, Lao kip
LBP, Lebanese pound
LKR, Sri Lankan rupee
LRD, Liberian dollar
LSL, Lesotho loti
LYD, Libyan dinar
MAD, Moroccan dirham
MDL, Moldovan leu
MGA, Malagasy ariary
MKD, Macedonian denar
MMK, Burmese kyat
MOP, Macanese pataca
MRU, Mauritanian ouguiya
MUR, Mauritian rupee
MVR, Maldivian rufiyaa
MWK, Malawian kwacha
MXN, Mexican peso
MYR, Malaysian ringgit
MZN, Mozambican metical
NAD, Namibian dollar
NGN, Nigerian naira
NIO, Nicaraguan córdoba
NOK, Norwegian krone
NPR, Nepalese rupee
NZD, New Zealand dollar
OMR, Omani rial
PAB, Panamanian balboa
PEN, Peruvian sol
PGK, Papua New Guinean kina
PHP, Philippine peso
PKR, Pakistani rupee
PLN, Polish złoty
PYG, Paraguayan guaraní
QAR, Qatari riyal
RON, Romanian leu
RSD, Serbian dinar
RUB, Russian ruble
RWF, Rwandan franc
SAR, Saudi riyal
SBD, Solomon Islands dollar
SCR, Seychellois rupee
SDG, Sudanese pound
SEK, Swedish krona
SGD, Singapore dollar
SLL, Sierra Leonean leone
SOS, Somali shilling
SRD, Surinamese dollar
SZL, Swazi lilangeni
THB, Thai baht
TJS, Tajikistani somoni
TMT, Turkmenistan manat
TND, Tunisian dinar
TOP, Tongan paʻanga
TRY, Turkish lira
TTD, Trinidad and Tobago dollar
TWD, New Taiwan dollar
TZS, Tanzanian shilling
UAH, Ukrainian hryvnia
UGX, Ugandan shilling
USD, United States dollar
UYU, Uruguayan peso
UZS, Uzbekistani soʻm
VES, Venezuelan bolívar soberano
VND, Vietnamese đồng
XAF, Central African CFA franc
XCD, Eastern Caribbean dollar
XOF, West African CFA franc
XPF, CFP franc
YER, Yemeni rial
ZAR, South African rand
ZMW, Zambian kwacha