R/get_ratings.R

Defines functions get_ratings

Documented in get_ratings

#' Get analyst raings for a given equity symbol from RobinHood
#'
#' @param RH object class RobinHood
#' @param symbol (string) Ticker symbol
#' @import httr magrittr
#' @export
#' @examples
#' \dontrun{
#' # Login in to your RobinHood account
#' RH <- RobinHood("username", "password")
#'
#' get_ratings(RH, symbol = "CAT")
#'}
get_ratings <- function(RH, symbol) {

    # Check if RH is valid
    check_rh(RH)

    # Get request from user information API
    ratings <- api_ratings(RH, symbol)

    return(ratings)
}

Try the RobinHood package in your browser

Any scripts or data that you put into this service are public.

RobinHood documentation built on March 1, 2021, 5:08 p.m.