Data Websocket
[Calendar] Ratings Stream
get calendar ratings stream.
WebSocket websocket/v1
:
Parameters
Name | Location | Type | Required | Description |
---|---|---|---|---|
token | query | string | Yes | Benzinga websocket token (bz.production***). |
tickers | query | string | Optional | List of tickers you want to subscribe for. Seperated by comma. |
isins | query | string | Optional | List of isins you want to filter by. Seperated by comma. |
Stream Response
When you subscribe to the stream, you’ll receive updates about analyst insights in the following format:
Responses
- 200 OK
- Description: Success
- Content Type:
application/json
- Schema: RatingsWSResp
Data Structures
RatingsWSResp
Property | Type | Description |
---|---|---|
id | string | Unique UUID for the websocket response |
api_version | string | Websocket API version |
kind | string | Websocket connection stream type |
data | object | Contains the ratings data. See below for properties. |
Data Properties
Property | Type | Description |
---|---|---|
action | string | Websocket data action i.e., created, updated, deleted |
id | string | Data ID for the rating |
content | object | Details about the ratings. See ratings for more properties. |
timestamp | string | Timestamp of the data |
Ratings
Property | Type | Description |
---|---|---|
id | string | Unique ID of this entry |
date | string | Date for rating |
time | string | Time for rating |
ticker | string | Ticker symbol of the company that is the subject of the rating |
exchange | string | Exchange (NYSE, NASDAQ, etc…) |
name | string | Name of the company that is the subject of the rating |
currency | string | Currency the data is denominated in |
action_pt | string | Description of the change in price target from the firm’s last price target |
action_company | string | Description of the change in rating from the firm’s last rating |
rating_current | string | The analyst’s current rating for the company |
pt_current | string | Analyst’s current price target |
adjusted_pt_current | string | Analyst’s current price target, adjusted for stock splits and dividends |
rating_prior | string | Prior analyst rating for the company |
pt_prior | string | Analyst’s prior price target |
adjusted_pt_prior | string | Analyst’s prior price target, adjusted for stock splits and dividends |
url | string | URL for the analyst ratings page for this ticker on Benzinga.com |
url_calendar | string | URL for the analyst ratings page for this ticker on Benzinga.com |
url_news | string | URL for the analyst ratings news articles for this ticker on Benzinga.com |
analyst | string | Name of the analyst firm that published the rating |
analyst_id | string | ID of the analyst |
analyst_name | string | Name of the analyst (person) that published the rating |
ratings_accuracy | object | Accuracy metrics for ratings. See ratings_accuracy for more properties. |
importance | string | Subjective basis of how important the event is to the market (5 = High) |
notes | string | Additional notes provided by the Benzinga Newsdesk where applicable. |
updated | integer | Last updated timestamp in UTC |
Ratings Accuracy
Property | Type | Description |
---|---|---|
smart_score | string | A weighted average of the total_ratings_percentile, overall_avg_return_percentile, and overall_success_rate |
overall_success_rate | string | The percentage of gain/loss ratings that resulted in a gain overall |
overall_avg_return_percentile | string | The percentile of this analyst’s overall average return per rating in comparison to other analysts |
total_ratings_percentile | string | The percentile of this analyst’s total number of ratings in comparison to the total number of ratings published |
total_ratings | integer | Number of recommendations made by this analyst |
overall_gain_count | integer | The number of ratings that have gained value since the date of recommendation |
overall_loss_count | integer | The number of ratings that have lost value since the date of recommendation |
overall_average_return | string | The average percent price difference per rating since the date of recommendation |
overall_stdev | string | The standard deviation in percent price difference in the analyst’s ratings since the date of recommendation |
1m_gain_count | string | The number of ratings that have gained value over the last month |
1m_loss_count | string | The number of ratings that have lost value over the last month |
1m_average_return | string | The average percent price difference per rating over the last month |
1m_stdev | string | The standard deviation in percent price difference in the analyst’s ratings over the last month |
3m_gain_count | string | The number of ratings that have gained value over the last three months |
3m_loss_count | string | The number of ratings that have lost value over the last three months |
3m_average_return | string | The average percent price difference per rating over the last three months |
3m_stdev | string | The standard deviation in percent price difference in the analyst’s ratings over the last three months |
9m_gain_count | string | The number of ratings that have gained value over the last nine months |
9m_loss_count | string | The number of ratings that have lost value over the last nine months |
Success Response
- Success
101
- Websocket connection established successfully.
✅ Connected to wss://api.benzinga.com/api/v2.1/calendar/ratings/stream?token=bz.p***
Handshake Details
Request Method: “GET”
Status Code: “101 Switching Protocols”
Error Response
- Unauthorized
401
- Invalid token, check the token provided.
❗ Could not connect to wss://api.benzinga.com/api/v2.1/calendar/ratings/stream?token=bz.p***
Error: Unexpected server response: 401
Handshake Details
Request Method: “GET”
Status Code: “401 Unauthorized”
- Bad Gateway
502
- Either invalid route or server error.
❗ Could not connect to wss://api.benzinga.com/api/v2.1/calendar/ratings/stream?token=bz.p***
Error: Unexpected server response: 502
Handshake Details
Request Method: “GET”
Status Code: “502 Bad Gateway”
Was this page helpful?