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-20 3880.5
# For multiple dates
get_currency("EUR/USD", from = Sys.Date() - 7, fill = TRUE)
#> date rate
#> 1 2025-09-14 1.172649
#> 2 2025-09-15 1.176374
#> 3 2025-09-16 1.187141
#> 4 2025-09-17 1.182634
#> 5 2025-09-18 1.179106
#> 6 2025-09-19 1.179106
#> 7 2025-09-20 1.179106
#> 8 2025-09-21 1.179106
# }