#' @title Investor ownership
#' @description Investor ownership in a company
#'
#' @param symbol Ticker symbol
#'
#' @importFrom purrr set_names
#' @importFrom dplyr mutate
#' @importFrom lubridate ymd
#'
#' @return
#' @export
#'
#' @examples
#' investor_ownership('NVDA')
investor_ownership <- function(symbol, ...){
url <- finnhub_endpoint('investor_ownership')
df <- retry_get(url,
query = list(token = finnhub_key(),
symbol = symbol))
df %>%
.[['ownership']] %>%
purrr::set_names(c('name', 'share', 'change', 'filing_date')) %>%
dplyr::mutate(filing_date = lubridate::ymd(filing_date, tz = finnhub_timezone))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.