get_exchangerate_tables_from_interval: Retrieves the exchange rate tables from a specific interval.

View source: R/endpoint_tables.R

get_exchangerate_tables_from_intervalR Documentation

Retrieves the exchange rate tables from a specific interval.

Description

Retrieves the exchange rate tables from a specific interval.

Usage

get_exchangerate_tables_from_interval(table, from, to)

Arguments

table

specifies which table should be fetched.

from

start day of the interval.

to

end day of the interval.

Details

As exchange rate tables are not published on the weekends fetching values from an interval containing a weekend will result in a response that omits those days.

Value

nbp_api_response object containing the exchange rates tables from the specified interval.

See Also

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

Other tables: get_current_exchangerate_table(), get_exchangerate_table_from(), get_last_n_exchangerate_tables(), get_todays_exchangerate_table()

Examples


tryCatch(
  {
    ## Fetch the exchange rate table from the past week
    response <- get_exchangerate_tables_from_interval("A", Sys.Date() - 7, Sys.Date())
    ## Preview response content
    response$content
  },
  error = function(e) message(e)
)



szymanskir/rnbp documentation built on April 12, 2025, 8:51 p.m.