nbp_fx_rates: Fetch National Bank of Poland (NBP) exchange rates

View source: R/nbp.R

nbp_fx_ratesR Documentation

Fetch National Bank of Poland (NBP) exchange rates

Description

Retrieve foreign currency exchange rates from the NBP Web API.

Usage

nbp_fx_rates(
  table,
  code = NULL,
  start_date = NULL,
  end_date = NULL,
  last_n = NULL
)

Arguments

table

(character(1))
Table type: "a" (mid rates, major currencies), "b" (mid rates, less common currencies), or "c" (bid/ask rates).

code

(NULL | character(1))
ISO 4217 currency code (e.g. "usd", "eur"). If NULL, returns all currencies.

start_date

(NULL | character(1) | Date(1))
Start date of the data. If end_date is omitted, only start_date is returned. The API limits the range to 367 days.

end_date

(NULL | character(1) | Date(1))
End date of the data. Requires start_date. If NULL, defaults to start_date.

last_n

(NULL | integer(1))
Return only the last n quotations.

Value

A data.table::data.table() with exchange rates.

Source

https://api.nbp.pl/en.html

See Also

Other data: banxico_data(), bbk_data(), bbk_series(), bcb_data(), bcb_expectations(), bcb_fx_rates(), bcb_inflation(), bcb_selic(), bcb_top5(), bde_data(), bde_latest(), bdf_codelist(), bdf_data(), bdf_dataset(), bdp_data(), bis_data(), boc_data(), boe_data(), boi_data(), boj_data(), cnb_czeonia(), cnb_data(), cnb_fx_other_rates(), cnb_fx_rates(), cnb_pribor(), ecb_data(), nbp_gold(), nob_data(), onb_data(), snb_data(), srb_cross_rates(), srb_data()

Examples



nbp_fx_rates("a", "eur")



bbk documentation built on Aug. 28, 2026, 5:07 p.m.