get_current_goldprice: Retrieves the current gold price.

Description Usage Value See Also Examples

View source: R/endpoint_goldprice.R

Description

Retrieves the current gold price.

Usage

1

Value

nbp_api_response object containing the current gold price.

See Also

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

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

Examples

1
2
3
4
5
6
7
8
  tryCatch({
      ## Fetch the current gold price
      response <- get_current_goldprice()
      ## Retrieve the current gold price value
      response$content$cena
    },
    error = function(e) message(e)
  )

rnbp documentation built on June 7, 2021, 9:07 a.m.