Retrieve the central bank exchange rate fixing (Czech koruna against foreign currencies) from the CNB API.
Arguments
- date
(
NULL|character(1)|Date(1))
The date to query, returning rates for all currencies on that day. IfNULL, the latest available fixing is returned. Mutually exclusive withyear. DefaultNULL.- year
(
NULL|integer(1))
A calendar year, returning rates for all currencies on every working day of that year. Mutually exclusive withdate. DefaultNULL.- lang
(
character(1))
Language for the country and currency names, either"EN"or"CZ". Withyear, the names are taken from the first and last fixings of that year. Default"EN".
Value
A data.table::data.table() with the requested exchange rates. The rate is the amount
of Czech koruna per amount units of the foreign currency.
See also
Other data:
banxico_data(),
bbk_data(),
bbk_series(),
bcb_data(),
bcb_expectations(),
bcb_fx_rates(),
bcb_inflation(),
bcb_selic(),
bcb_top5(),
bde_data(),
bde_latest(),
bdf_codelist(),
bdf_data(),
bdf_dataset(),
bdp_data(),
bis_data(),
boc_data(),
boe_data(),
boi_data(),
boj_data(),
cnb_czeonia(),
cnb_data(),
cnb_fx_other_rates(),
cnb_pribor(),
ecb_data(),
nbb_data(),
nbp_fx_rates(),
nbp_gold(),
nob_data(),
onb_data(),
snb_data(),
srb_cross_rates(),
srb_data()
Examples
# \donttest{
# latest fixing for all currencies
cnb_fx_rates()
#> date currency_code currency country amount rate
#> <Date> <char> <char> <char> <int> <num>
#> 1: 2026-10-21 AUD dollar Australia 1 15.191
#> 2: 2026-10-21 BRL real Brazil 1 4.306
#> 3: 2026-10-21 CAD dollar Canada 1 15.375
#> 4: 2026-10-21 CNY renminbi China 1 3.235
#> 5: 2026-10-21 DKK krone Denmark 1 3.246
#> 6: 2026-10-21 EUR euro EMU 1 24.260
#> 7: 2026-10-21 HKD dollar Hongkong 1 2.752
#> 8: 2026-10-21 HUF forint Hungary 100 6.644
#> 9: 2026-10-21 ISK krona Iceland 100 17.812
#> 10: 2026-10-21 XDR SDR IMF 1 29.251
#> 11: 2026-10-21 INR rupee India 100 22.858
#> 12: 2026-10-21 IDR rupiah Indonesia 1000 1.199
#> 13: 2026-10-21 ILS new shekel Israel 1 6.988
#> 14: 2026-10-21 JPY yen Japan 100 13.680
#> 15: 2026-10-21 MYR ringgit Malaysia 1 5.291
#> 16: 2026-10-21 MXN peso Mexico 1 1.168
#> 17: 2026-10-21 NZD dollar New Zealand 1 12.293
#> 18: 2026-10-21 NOK krone Norway 1 2.308
#> 19: 2026-10-21 PHP peso Philippines 100 34.107
#> 20: 2026-10-21 PLN zloty Poland 1 5.560
#> 21: 2026-10-21 RON leu Romania 1 4.545
#> 22: 2026-10-21 SGD dollar Singapore 1 16.907
#> 23: 2026-10-21 ZAR rand South Africa 1 1.320
#> 24: 2026-10-21 KRW won South Korea 100 1.628
#> 25: 2026-10-21 SEK krona Sweden 1 2.186
#> 26: 2026-10-21 CHF franc Switzerland 1 26.218
#> 27: 2026-10-21 THB baht Thailand 100 64.294
#> 28: 2026-10-21 TRY lira Turkey 100 43.533
#> 29: 2026-10-21 GBP pound United Kingdom 1 28.938
#> 30: 2026-10-21 USD dollar USA 1 21.593
#> date currency_code currency country amount rate
#> <Date> <char> <char> <char> <int> <num>
# all fixings for a given year
cnb_fx_rates(year = 2024L)
#> date currency_code currency country amount rate
#> <Date> <char> <char> <char> <int> <num>
#> 1: 2024-01-02 AUD dollar Australia 1 15.278
#> 2: 2024-01-02 BGN lev Bulgaria 1 12.621
#> 3: 2024-01-02 BRL real Brazil 1 4.609
#> 4: 2024-01-02 CAD dollar Canada 1 16.938
#> 5: 2024-01-02 CHF franc Switzerland 1 26.524
#> ---
#> 7808: 2024-12-31 THB baht Thailand 100 70.618
#> 7809: 2024-12-31 TRY lira Turkey 100 68.539
#> 7810: 2024-12-31 USD dollar USA 1 24.237
#> 7811: 2024-12-31 XDR SDR IMF 1 31.609
#> 7812: 2024-12-31 ZAR rand South Africa 1 1.284
# }