get_todays_goldprice {rnbp} | R Documentation |
Retrieves the gold price that was published today.
Description
Retrieves the gold price that was published today.
Usage
get_todays_goldprice()
Details
If today's data is not available the API will return a 404 Not found error. In that case the function will return an error with an appropriate message.
Value
nbp_api_response object containing today's gold price.
See Also
Other goldprice:
get_current_goldprice()
,
get_goldprice_from_interval()
,
get_goldprice_from()
,
get_last_n_goldprices()
Examples
tryCatch({
## Fetch todays gold price
response <- get_todays_goldprice()
## Preview response content
response$content
},
error = function(e) message(e)
)
[Package rnbp version 0.2.1 Index]