nbp_gold: Fetch National Bank of Poland (NBP) gold prices

View source: R/nbp.R

nbp_goldR Documentation

Fetch National Bank of Poland (NBP) gold prices

Description

Retrieve the price of gold from the NBP Web API.

Usage

nbp_gold(start_date = NULL, end_date = NULL, last_n = NULL)

Arguments

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 gold prices.

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_fx_rates(), nob_data(), onb_data(), snb_data(), srb_cross_rates(), srb_data()

Examples



nbp_gold(last_n = 10L)



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