View source: R/endpoint_goldprice.R
get_todays_goldprice | R Documentation |
Retrieves the gold price that was published today.
get_todays_goldprice()
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.
nbp_api_response object containing today's gold price.
Other goldprice:
get_current_goldprice()
,
get_goldprice_from()
,
get_goldprice_from_interval()
,
get_last_n_goldprices()
tryCatch(
{
## Fetch todays gold price
response <- get_todays_goldprice()
## Preview response content
response$content
},
error = function(e) message(e)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.