get_current_goldprice: Retrieves the current gold price.

View source: R/endpoint_goldprice.R

get_current_goldpriceR Documentation

Retrieves the current gold price.

Description

Retrieves the current gold price.

Usage

get_current_goldprice()

Value

nbp_api_response object containing the current gold price.

See Also

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

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

Examples


tryCatch(
  {
    ## Fetch the current gold price
    response <- get_current_goldprice()
    ## Retrieve the current gold price value
    response$content$cena
  },
  error = function(e) message(e)
)



szymanskir/rnbp documentation built on April 12, 2025, 8:51 p.m.