Retrieves the current exchange rate for the given currency.
Retrieves the current exchange rate for the given currency.
get_current_exchangerate(table, currency_code)
Arguments
table: specifies which from which table the exchange rate should be fetched.
currency_code: code of the currency for which the exchange rate should be fetched.
Returns
nbp_api_response object containing the current exchange rate.
Examples
tryCatch({## Retrieve the current exchange rate for euros response <- get_current_exchangerate("A","EUR")## Retrieve the content response$content
}, error =function(e) message(e))