#' @title Forex Symbols
#' @description Get symbols from currency exchanges
#'
#' @param exchange Forex exchange - oanda, fxcm, forex.com, ic markets, etc.
#'
#' @importFrom purrr set_names
#' @importFrom tibble as_tibble
#'
#' @return
#' @export
#'
#' @examples
#' forex_symbols(forex_exchange = 'oanda')
#' forex_symbols(forex_exchange = 'fxcm')
#' forex_symbols(forex_exchange = 'forex.com')
#' forex_symbols(forex_exchange = 'ic markets')
#' forex_symbols(forex_exchange = 'octafx')
#' forex_symbols(forex_exchange = 'fxpig')
#' forex_symbols(forex_exchange = 'pepperstone')
#' forex_symbols(forex_exchange = 'fxpro')
#' forex_symbols(forex_exchange = 'icmtrader')
#'
#' all_exchanges <- purrr::map(forex_exchanges() %>% purrr::pull(),
#' forex_symbols) %>%
# dplyr::bind_rows
forex_symbols <- function(forex_exchange = 'oanda', ...){
url <- finnhub_endpoint('forex_symbols')
df <- retry_get(url,
query = list(token = finnhub_key(),
exchange = forex_exchange)
)
df %>%
purrr::set_names(c('description', 'display_symbol', 'symbol')) %>%
tibble::as_tibble()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.