This function lets the user download historical currency exchange rate between two currencies.
Examples
# \donttest{
# For today (or any one single date)
get_currency("USD/COP", from = Sys.Date())
#> date rate
#> 1 2025-06-26 4060.44
# For multiple dates
get_currency("EUR/USD", from = Sys.Date() - 7, fill = TRUE)
#> date rate
#> 1 2025-06-19 1.151278
#> 2 2025-06-20 1.151278
#> 3 2025-06-21 1.151278
#> 4 2025-06-22 1.150086
#> 5 2025-06-23 1.159904
#> 6 2025-06-24 1.161224
#> 7 2025-06-25 1.161224
#> 8 2025-06-26 1.165909
# }