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-02-19 4095.47
# For multiple dates
get_currency("EUR/USD", from = Sys.Date() - 7, fill = TRUE)
#> date rate
#> 1 2025-02-12 1.036495
#> 2 2025-02-13 1.039199
#> 3 2025-02-14 1.046167
#> 4 2025-02-15 1.046167
#> 5 2025-02-16 1.046167
#> 6 2025-02-17 1.048922
#> 7 2025-02-18 1.048537
#> 8 2025-02-19 1.045151
# }