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-05-05 4252.47
# For multiple dates
get_currency("EUR/USD", from = Sys.Date() - 7, fill = TRUE)
#> date rate
#> 1 2025-04-28 1.140914
#> 2 2025-04-29 1.138926
#> 3 2025-04-30 1.132490
#> 4 2025-05-01 1.129650
#> 5 2025-05-02 1.129650
#> 6 2025-05-03 1.129650
#> 7 2025-05-04 1.129650
#> 8 2025-05-05 1.130199
# }