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-09-12 3887.47
# For multiple dates
get_currency("EUR/USD", from = Sys.Date() - 7, fill = TRUE)
#> date rate
#> 1 2025-09-05 1.171317
#> 2 2025-09-06 1.171317
#> 3 2025-09-07 1.171317
#> 4 2025-09-08 1.176914
#> 5 2025-09-09 1.170275
#> 6 2025-09-10 1.170344
#> 7 2025-09-11 1.170344
#> 8 2025-09-12 1.173847
# }