#' @title Company executives
#' @description Get a list of company executives, age, sex, length of employment
#' and compensation
#'
#' @param symbol Stock ticker
#'
#' @importFrom dplyr mutate
#' @importFrom purrr set_names
#' @return
#' @export
#'
#' @examples
#' company_executive('NVDA')
company_executive <- function(symbol, ...){
url <- finnhub_endpoint('company_executive')
retry_get(url,
query = list(token = finnhub_key(),
symbol = symbol)) %>%
.[['executive']] %>%
purrr::set_names(c('age', 'compensation' ,'currency', 'name', 'position',
'sex', 'since')) %>%
dplyr::mutate(symbol = symbol)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.