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 2024-10-23 4264.09
# For multiple dates
get_currency("EUR/USD", from = Sys.Date() - 7, fill = TRUE)
#> date rate
#> 1 2024-10-16 1.086248
#> 2 2024-10-17 1.082954
#> 3 2024-10-18 1.082954
#> 4 2024-10-19 1.082954
#> 5 2024-10-20 1.086862
#> 6 2024-10-21 1.086862
#> 7 2024-10-22 1.086862
#> 8 2024-10-23 1.080147
# }