Learn R Programming

bbk (version 0.11.0)

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

Value

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

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.

end_date

(NULL | character(1) | Date(1))
End date of the data.

last_n

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

See Also

Other data: bbk_data(), bbk_series(), bde_data(), bde_latest(), bdf_codelist(), bdf_data(), bdf_dataset(), bdp_data(), bis_data(), boc_data(), boe_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

Run this code
# \donttest{
nbp_fx_rates("a", "eur")
# }

Run the code above in your browser using DataLab