fx.ianlewis.org
fx.ianlewis.org
is a currency conversion API. It currently supports MUFG published rates between 31 currencies and JPY.
Data Types & Endpoints
The following sections outline the various data types available in the API.
The full OpenAPI definition can be viewed at /v1/openapi.yaml.
Provider
Currency exchange provider information can be retrieved via the provider endpoint. The Provider
object's format is defined in provider.proto
.
{
"providers": [
{
"code": "MUFG",
"name": "MUFG Bank, Ltd."
// ...
}
// ...
]
}
Individual providers can be accessed via their code.
{
"code": "MUFG",
"name": "MUFG Bank, Ltd.",
"supportedBaseCurrencies": [
"USD",
"EUR",
"CAD",
"GBP",
"CHF",
"DKK",
"NOK",
"SEK",
"AUD",
"NZD",
"HKD",
"MYR",
"SGD",
"SAR",
"AED",
"CNY",
"THB",
"INR",
"PKR",
"KWD",
"QAR",
"IDR",
"MXN",
"KRW",
"PHP",
"ZAR",
"CZK",
"RUB",
"HUF",
"PLN",
"TRY"
],
"supportedQuoteCurrencies": ["JPY"]
}
Currencies
Currency information can be retrieved via the currency endpoint using the currency's ISO 4217 alphabetic code. The Currency
object's format is defined in currency.proto
.
{
"currencies": [
{
"alphabeticCode": "AFN",
"numericCode": "971",
"name": "Afghani",
"minorUnits": 2,
"countries": ["AFGHANISTAN"]
}
// ...
]
}
{
"alphabeticCode": "USD",
"numericCode": "840",
"name": "US Dollar",
"countries": [
"AMERICAN SAMOA",
"BONAIRE, SINT EUSTATIUS AND SABA",
"BRITISH INDIAN OCEAN TERRITORY (THE)",
"ECUADOR",
"EL SALVADOR",
"GUAM",
"HAITI",
"MARSHALL ISLANDS (THE)",
"MICRONESIA (FEDERATED STATES OF)",
"NORTHERN MARIANA ISLANDS (THE)",
"PALAU",
"PANAMA",
"PUERTO RICO",
"TIMOR-LESTE",
"TURKS AND CAICOS ISLANDS (THE)",
"UNITED STATES MINOR OUTLYING ISLANDS (THE)",
"UNITED STATES OF AMERICA (THE)",
"VIRGIN ISLANDS (BRITISH)",
"VIRGIN ISLANDS (U.S.)"
]
}
Quotes
Currency exchange rate quotes can be retrieved via a provider's quote endpoint. The Quote
object's format is defined in quote.proto
.
Quotes for a single day can be accessed by date.
/v1/provider/MUFG/quote/USD/JPY/2025/03/11.json
{
"providerCode": "MUFG",
"date": {
"year": 2025,
"month": 3,
"day": 11
},
"baseCurrencyCode": "USD",
"quoteCurrencyCode": "JPY",
"ask": {
"currencyCode": "JPY",
"units": "147",
"nanos": 680000000
},
"bid": {
"currencyCode": "JPY",
"units": "145",
"nanos": 680000000
},
"mid": {
"currencyCode": "JPY",
"units": "146",
"nanos": 680000000
}
}
Formats
Each endpoint can be accessed in JSON (.json), CSV (.csv), and Protocol Buffers Wire format (.binpb) via their associated file extension.
/v1/provider/MUFG/quote/USD/JPY/2025/03.csv
date,providerCode,baseCurrencyCode,quoteCurrencyCode,ask,bid,mid
2025/03/03,MUFG,USD,JPY,151.56,149.56,150.56
2025/03/04,MUFG,USD,JPY,150.26,148.26,149.26
2025/03/05,MUFG,USD,JPY,150.87,148.87,149.87
2025/03/06,MUFG,USD,JPY,150.25,148.25,149.25
2025/03/07,MUFG,USD,JPY,149.07,147.07,148.07
2025/03/10,MUFG,USD,JPY,148.38,146.38,147.38
2025/03/11,MUFG,USD,JPY,147.68,145.68,146.68
2025/03/12,MUFG,USD,JPY,149.08,147.08,148.08
...
Importing Data
You can import CSV data into spreadsheets.
Google Sheets
Use the IMPORTDATA
function to import data into the sheet. In the top-left
cell where you would like to import the data add the following formula with the
URL to the desired data.
=IMPORTDATA("https://fx.ianlewis.org/v1/provider/MUFG/quote/USD/JPY/2024.csv")