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-07-11 4011.63
# For multiple dates
get_currency("EUR/USD", from = Sys.Date() - 7, fill = TRUE)
#> date rate
#> 1 2025-07-04 1.178078
#> 2 2025-07-05 1.178078
#> 3 2025-07-06 1.178078
#> 4 2025-07-07 1.173654
#> 5 2025-07-08 1.172457
#> 6 2025-07-09 1.173117
#> 7 2025-07-10 1.173117
#> 8 2025-07-11 1.170549
# }