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-06 4173.47
# For multiple dates
get_currency("EUR/USD", from = Sys.Date() - 7, fill = TRUE)
#> date rate
#> 1 2025-01-30 1.042525
#> 2 2025-01-31 1.039728
#> 3 2025-02-01 1.039728
#> 4 2025-02-02 1.039728
#> 5 2025-02-03 1.024779
#> 6 2025-02-04 1.032738
#> 7 2025-02-05 1.037280
#> 8 2025-02-06 1.040691
# }