WebSocket websocket/v1:

wss://api.benzinga.com/api/v1/analyst/insights/stream

Parameters

NameLocationTypeRequiredDescription
tokenquerystringYesBenzinga websocket token (bz.production***).
tickersquerystringOptionalList of tickers you want to subscribe for. Seperated by comma.
isinsquerystringOptionalList 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:

{
  "id": "websocket123",
  "api_version": "websocket/v1",
  "kind": "bull_bear_case",
  "data": {
    "action": "created",
    "id": "case123",
    "content": {
      "bear_case": "Market downturn expected.",
      "bull_case": "Positive earnings forecast.",
      "id": "case123",
      "ticker": "AAPL",
      "updated": 1696153200
    },
    "timestamp": "2024-10-01T10:00:00Z"
  }
}

Responses

  • 200 OK
    • Description: Success
    • Content Type: application/json
    • Schema: BullBearWSResp

BullBearWSResp

ParameterTypeDescription
idstringUnique UUID for the WebSocket response
api_versionstringWebSocket API version
kindstringWebSocket connection stream type
dataobjectContains the action and details of the bull/bear case

Data Object (inside BullBearWSResp)

ParameterTypeDescription
actionstringWebSocket data action (e.g., created, updated, deleted)
idstringData ID for the bull/bear case
contentobjectThe bull/bear case details (see below)
timestampstringTimestamp of the data

BullBearCase Schema (inside data content)

ParameterTypeDescription
bear_casestringDescription of the bear case scenario
bull_casestringDescription of the bull case scenario
idstringUnique identifier for the bull/bear case (UUID format)
tickerstringStock ticker symbol related to the bull/bear case
updatedintegerTimestamp of when the case was last updated (int64 format)

Success Response

  • Success 101 - Websocket connection established successfully.

✅ Connected to wss://api.benzinga.com/api/v1/bulls_bears_say/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/v1/bulls_bears_say/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/v1/bulls_bears_say/stream?token=bz.p***

Error: Unexpected server response: 502

Handshake Details

Request Method: “GET”
Status Code: “502 Bad Gateway”