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