Fetch Czech National Bank (CNB) exchange rates of other currencies
Source:R/cnb.R
cnb_fx_other_rates.RdRetrieve the monthly exchange rate fixing for less commonly traded ("other") currencies from the
CNB API. These currencies are not part of the daily fixing returned by cnb_fx_rates().
Arguments
- year_month
(
NULL|character(1))
The month to query in"YYYY-MM"format, returning rates for all currencies in that month. IfNULL, the latest available month is returned. Mutually exclusive withyear. DefaultNULL.- year
(
NULL|integer(1))
A calendar year, returning rates for all currencies in every month of that year. Mutually exclusive withyear_month. DefaultNULL.- lang
(
character(1))
Language for the country and currency names, either"EN"or"CZ". 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:
bbk_data(),
bbk_series(),
bcb_data(),
bcb_expectations(),
bcb_fx_rates(),
bde_data(),
bde_latest(),
bdf_codelist(),
bdf_data(),
bdf_dataset(),
bdp_data(),
bis_data(),
boc_data(),
boe_data(),
boj_data(),
cnb_czeonia(),
cnb_data(),
cnb_fx_rates(),
cnb_pribor(),
ecb_data(),
nbp_fx_rates(),
nbp_gold(),
nob_data(),
onb_data(),
snb_data(),
srb_cross_rates(),
srb_data()
Examples
# \donttest{
# latest month for all other currencies
cnb_fx_other_rates()
#> Empty data.table (0 rows and 6 cols): date,currency_code,currency,country,amount,rate
# a specific month
cnb_fx_other_rates(year_month = "2024-01")
#> date currency_code currency country amount rate
#> <Date> <char> <char> <char> <int> <num>
#> 1: 2024-01-31 AFN afghani Afghanistan 100 31.052
#> 2: 2024-01-31 ALL lek Albania 100 24.016
#> 3: 2024-01-31 DZD dinar Algeria 100 17.069
#> 4: 2024-01-31 AOA kwanza Angola 100 2.717
#> 5: 2024-01-31 ARS peso Argentina 100 2.776
#> ---
#> 120: 2024-01-31 VEF bolivar Venezuela 1 0.000
#> 121: 2024-01-31 VND dong Vietnam 10000 9.394
#> 122: 2024-01-31 YER rial Yemen 100 9.175
#> 123: 2024-01-31 ZMW kwacha Zambia 1 0.848
#> 124: 2024-01-31 ZWL dollar Zimbabwe 1000 0.000
# all months of a given year
cnb_fx_other_rates(year = 2024L)
#> date currency_code currency country amount rate
#> <Date> <char> <char> <char> <int> <num>
#> 1: 2024-01-31 AED dirham United Arab Emirates 1 6.245
#> 2: 2024-01-31 AFN afghani Afghanistan 100 31.052
#> 3: 2024-01-31 ALL lek Albania 100 24.016
#> 4: 2024-01-31 AMD dram Armenia 100 5.719
#> 5: 2024-01-31 ANG guilder Curacao and St. Maarten 1 12.885
#> ---
#> 1484: 2024-12-31 XOF franc CFA BCEAO 100 3.872
#> 1485: 2024-12-31 XPF franc CFP French Polynesia 100 21.158
#> 1486: 2024-12-31 YER rial Yemen 100 9.731
#> 1487: 2024-12-31 ZMW kwacha Zambia 1 0.873
#> 1488: 2024-12-31 ZWL dollar Zimbabwe 1000 0.000
# }