#' @title Pattern Recognition - WARNING: Not consistent output
#' @description Get pattern recognition output
#'
#' @param symbol Stock ticker
#' @param resolution 1-minute, 5-minute, 15-minute, 30-minute, 60-minute,
#' daily, weekly and monthly
#'
#' @importFrom purrr set_names
#'
#' @return
#' @export
#'
#' @examples
#' pattern_recognition('AAPL')
pattern_recognition <- function(symbol, resolution = 'D', ...){
url <- finnhub_endpoint('pattern_recognition')
df <- retry_get(url,
query = list(token = finnhub_key(),
symbol = symbol,
resolution = resolution))
# df
df %>%
.[['points']]
# %>%
# purrr::set_names(c('a_price', 'a_time', 'b_price', 'b_time', 'c_price', 'c_time',
# 'd_price', 'd_time', 'entry', 'entry_date', 'e_price', 'e_time',
# 'mature', 'pattern_name', 'pattern_type', 'profit_1',
# 'profit_2', 'sort_time', 'status', 'stop_loss', 'symbol',
# 'terminal', 'end_price', 'end_time', 'start_price', 'start_time'))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.