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-01-09 4321.52
# For multiple dates
get_currency("EUR/USD", from = Sys.Date() - 7, fill = TRUE)
#> date rate
#> 1 2025-01-02 1.035186
#> 2 2025-01-03 1.026821
#> 3 2025-01-04 1.026821
#> 4 2025-01-05 1.026821
#> 5 2025-01-06 1.030535
#> 6 2025-01-07 1.038637
#> 7 2025-01-08 1.034554
#> 8 2025-01-09 1.032205
# }