Retrieve the price of gold from the NBP Web API.
Value
A data.table::data.table() with gold prices.
See also
Other data:
bbk_data(),
bbk_series(),
bcb_data(),
bcb_expectations(),
bcb_fx_rates(),
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_fx_rates(),
nob_data(),
onb_data(),
snb_data(),
srb_cross_rates(),
srb_data()
Examples
# \donttest{
nbp_gold(last_n = 10L)
#> date price
#> <Date> <num>
#> 1: 2026-05-29 514.16
#> 2: 2026-06-01 528.20
#> 3: 2026-06-02 525.10
#> 4: 2026-06-03 529.05
#> 5: 2026-06-05 522.16
#> 6: 2026-06-08 522.08
#> 7: 2026-06-09 508.68
#> 8: 2026-06-10 510.02
#> 9: 2026-06-11 492.71
#> 10: 2026-06-12 484.21
# }