cURL
curl --request GET \ --url https://openapi.ainvest.com/open/analysis-ratings/consensus \ --header 'Authorization: Bearer <token>'
"data": { "analysts_ratings": { "count": 50, "buy": 32, "hold": 14, "sell": 4, "average_rating": "Buy" }, "target_price": { "count": 16, "high": 300.0, "average": 226.97625, "low": 170.0 } }
Get current rating and target price averaged across all analysts opinions
Bearer authentication header of the form Bearer <token>, where <token> is your key. Get the key here
Bearer <token>
<token>
US stock market ticker symbol, e.g. AAPL, TSLA, etc.
Successful response in standard envelope
Average rating and target price. null if there are no ratings available
Show child attributes
Number of analyst ratings for each rating level
Total number of ratings
Number of analysts rating the stock as buy
Number of analysts rating the stock as hold
Number of analysts rating the stock as sell
Prevailing rating across all analysts
Variation of target prices
Total number of analysts providing target prices
Highest target price
Average target price
Lowest target price
Status code, 0 for success
0
Status message, success for success
success