py_alpaca_api.trading.recommendations

Classes

Recommendations

Module Contents

class py_alpaca_api.trading.recommendations.Recommendations[source]
static get_recommendations(symbol: str) dict[Any, Any] | pandas.DataFrame[source]

Retrieves the latest recommendations for a given stock symbol.

Parameters:

symbol (str) – The stock symbol for which to retrieve recommendations.

Returns:

A dictionary or DataFrame containing the latest recommendations for the stock symbol.

Return type:

Union[dict, pd.DataFrame]

get_sentiment(symbol: str) str[source]

Retrieves the sentiment for a given stock symbol based on the latest recommendations.

Parameters:

symbol (str) – The stock symbol for which to retrieve the sentiment.

Returns:

The sentiment for the stock symbol, either “BULLISH”, “BEARISH”, or “NEUTRAL”.

Return type:

str