Retrieve the price of gold from the NBP Web API.
Value
A data.table::data.table() with gold prices.
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(),
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-07-06 502.78
#> 2: 2026-07-07 500.82
#> 3: 2026-07-08 498.29
#> 4: 2026-07-09 492.33
#> 5: 2026-07-10 497.76
#> 6: 2026-07-13 500.90
#> 7: 2026-07-14 495.67
#> 8: 2026-07-15 491.52
#> 9: 2026-07-16 490.84
#> 10: 2026-07-17 489.41
# }