get_current_exchangerate function

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) )

See Also

https://api.nbp.pl/#kursyWalut

Other rates: get_exchangerate_from(), get_exchangerate_from_interval(), get_last_n_exchangerates(), get_todays_exchangerate()

  • Maintainer: Ryszard Szymanski
  • License: GPL-3
  • Last published: 2025-03-23