get_last_n_goldprices function

Retrieves the last n gold prices.

Retrieves the last n gold prices.

get_last_n_goldprices(n)

Arguments

  • n: number of gold prices to retrieve.

Returns

nbp_api_response object containing the last n gold prices.

Examples

tryCatch( { ## Fetch the last 3 gold price values response <- get_last_n_goldprices(3) ## Preview response content response$content }, error = function(e) message(e) )

See Also

https://api.nbp.pl/#cenyZlota

Other goldprice: get_current_goldprice(), get_goldprice_from(), get_goldprice_from_interval(), get_todays_goldprice()

  • Maintainer: Ryszard Szymanski
  • License: GPL-3
  • Last published: 2025-03-23