Retrieves the exchange rate table from a specific date.
Retrieves the exchange rate table from a specific date.
get_exchangerate_table_from(table, date)
Arguments
table: specifies which table should be fetched.
date: date from which the exchange rate table should be fetched.
Returns
nbp_api_response object containing the exchange rate table from the specified date.
Details
As exchange rate tables are not published on the weekends fetching values from a weekend date will result in a 404 error. In those cases the function returns an error with an appropriate message.
Examples
tryCatch({## Fetch the A exchange rate table from a week ago response <- get_exchangerate_table_from("A", Sys.Date()-7)## Preview response content response$content
}, error =function(e) message(e))