get_last_n_goldprices {rnbp} | R Documentation |
Retrieves the last n gold prices.
get_last_n_goldprices(n)
n |
number of gold prices to retrieve. |
nbp_api_response object containing the last n gold prices.
Other goldprice:
get_current_goldprice()
,
get_goldprice_from_interval()
,
get_goldprice_from()
,
get_todays_goldprice()
tryCatch({
## Fetch the last 3 gold price values
response <- get_last_n_goldprices(3)
## Preview response content
response$content
},
error = function(e) message(e)
)