Master data management Β· features 286-305
πŸ›’οΈ SQL Server Β· MasterDataLabDB
πŸ“ˆ

301Exchange Rates

Daily rates against the base currency. The rate of a date is the newest one on or before it.

Try it

Currency converter

Uses the newest rate on or before the date; other pairs go through the base currency
100 USD = ΰΈΏ3,295.00 1 USD = 32.95 THB rates of 2026-10-23 / 2026-11-09
DateRate (THB)Source
2026-10-2332.95Sample
2026-10-1533.05Sample
2026-10-0132.8Sample
# Currency Date Rate (THB per 1 unit) Source Status
17 AUD - Australian Dollar 2026-10-23 21.7 Sample Active ✏️
13 CNY - Chinese Yuan 2026-10-23 4.63 Sample Active ✏️
6 EUR - Euro 2026-10-23 38.5 Sample Active ✏️
11 GBP - Pound Sterling 2026-10-23 43.85 Sample Active ✏️
16 HKD - Hong Kong Dollar 2026-10-23 4.24 Sample Active ✏️
9 JPY - Japanese Yen 2026-10-23 0.2203 Sample Active ✏️
18 KRW - Korean Won 2026-10-23 0.0238 Sample Active ✏️
15 SGD - Singapore Dollar 2026-10-23 25.38 Sample Active ✏️
3 USD - US Dollar 2026-10-23 32.95 Sample Active ✏️
5 EUR - Euro 2026-10-15 38.62 Sample Active ✏️
8 JPY - Japanese Yen 2026-10-15 0.2195 Sample Active ✏️
2 USD - US Dollar 2026-10-15 33.05 Sample Active ✏️
12 CNY - Chinese Yuan 2026-10-01 4.62 Sample Active ✏️
4 EUR - Euro 2026-10-01 38.4 Sample Active ✏️
10 GBP - Pound Sterling 2026-10-01 43.9 Sample Active ✏️
Showing 1–15 of 18
πŸŽ“ Learn: how this master is built table exchange_rate
  • Spring Data derived query: findFirstByCurrencyCodeAndRateDateLessThanEqual...OrderByRateDateDesc.
  • Cross rate USD β†’ EUR = rate(USD) Γ· rate(EUR).
  • A FOREIGN KEY to a UNIQUE column (currency.code), not only to an id.
Entity
domain/ExchangeRate.java
Repository
repo/ExchangeRateRepository.java
Definition
MasterRegistry: "exchange-rates"
Page / form
web/MasterController.java
Try-it panel
templates/tools/fx-convert.html
REST API
GET /api/exchange/convert?amount=100&from=USD&to=EUR&date=2026-10-26
SELECT TOP 1 rate, rate_date FROM exchange_rate
WHERE currency_code = 'USD' AND rate_date <= '2026-10-20' AND active = 1
ORDER BY rate_date DESC;