View source: R/endpoint_rates.R
get_current_exchangerate | R Documentation |
Retrieves the current exchange rate for the given currency.
get_current_exchangerate(table, currency_code)
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. |
nbp_api_response object containing the current exchange rate.
https://api.nbp.pl/#kursyWalut
Other rates:
get_exchangerate_from()
,
get_exchangerate_from_interval()
,
get_last_n_exchangerates()
,
get_todays_exchangerate()
tryCatch(
{
## Retrieve the current exchange rate for euros
response <- get_current_exchangerate("A", "EUR")
## Retrieve the content
response$content
},
error = function(e) message(e)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.