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 2024-09-13 4208.39
# For multiple dates
get_currency("EUR/USD", from = Sys.Date() - 7, fill = TRUE)
#> date rate
#> 1 2024-09-06 1.108721
#> 2 2024-09-07 1.108721
#> 3 2024-09-08 1.108721
#> 4 2024-09-09 1.103753
#> 5 2024-09-10 1.102098
#> 6 2024-09-11 1.101091
#> 7 2024-09-12 1.101091
#> 8 2024-09-13 1.107788
# }