Data Websocket
[Calendar] Earnings Stream
Get calendar earnings 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: EarningsWSResp
Data Structures
EarningsWSResp
The main response structure for earnings data.
Parameter | 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 action and details of the earnings data |
Data Object (inside EarningsWSResp)
Parameter | Type | Description |
---|---|---|
action | string | WebSocket data action (e.g., created, updated, deleted) |
id | string | Data ID for the earnings |
content | object | The earnings details (see below) |
timestamp | string | Timestamp of the data |
Earnings Schema (inside data content)
Parameter | Type | Description |
---|---|---|
id | string | Unique identifier for the earnings |
date | string | Announced Date on Calendar |
date_confirmed | string | If the report date was confirmed (1/0) |
time | string | Announced Time on Calendar (24hr format) |
ticker | string | Ticker Symbol (F, MSFT, etc…) |
exchange | string | Exchange (NYSE, NASDAQ, etc…) |
name | string | Name of the security |
currency | string | Currency the data is denominated in |
period | string | Period of the earnings actual (Q1, Q2, Q3, Q4, FY, H1, H2) |
period_year | integer | Period Year of the earnings actual |
eps_type | string | EPS Type (Adj, GAAP, FFO) |
eps | string | Comparable and Adjusted Earnings Per Share |
eps_est | string | Adjusted EPS Consensus Aggregate Analyst Estimate |
eps_prior | string | Adjusted EPS from Prior Period |
eps_surprise | string | EPS deviation from estimate |
eps_surprise_percent | string | Deviation from estimate as a percentage |
revenue_type | string | Revenue Type (Adj, GAAP, FFO) |
revenue | string | Revenue |
revenue_est | string | Revenue estimate |
revenue_prior | string | Revenue value for previous period |
revenue_surprise | string | Revenue deviation from estimate |
revenue_surprise_percent | string | Deviation from estimate as a percentage |
importance | integer | Importance of the event to the market (0-5) |
notes | string | Additional notes provided by the Benzinga Newsdesk |
updated | integer | Last updated timestamp (UTC) |
Success Response
- Success
101
- Websocket connection established successfully.
✅ Connected to wss://api.benzinga.com/api/v2.1/calendar/earnings?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/earnings/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/earnings/stream?token=bz.p***
Error: Unexpected server response: 502
Handshake Details
Request Method: “GET”
Status Code: “502 Bad Gateway”
Was this page helpful?