#' @title Company symbols
#' @description Get a list of available stock symbols
#'
#' @param exchange Stock exchange. See available_exchanges() data
#'
#' @importFrom dplyr mutate
#' @importFrom purrr set_names
#' @return
#' @export
#'
#' @examples
#' company_symbols(exchange = 'US')
company_symbols <- function(exchange, ...){
url <- finnhub_endpoint('company_symbols')
retry_get(url,
query = list(token = finnhub_key(),
exchange = exchange)) %>%
dplyr::mutate(exchange = exchange) %>%
purrr::set_names(c('currency', 'description', 'display_symbol', 'symbol', 'type', 'exchange'))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.