Skip to main content
Benzinga’s WebSocket API delivers low-latency, push-based financial data directly to your application. Instead of repeatedly polling a REST endpoint, you open a single persistent connection and receive events the moment they’re available — analyst ratings, earnings results, news, transcripts, and more. All streams share the same base endpoint, authentication model, and message envelope, so the patterns you learn on one stream apply everywhere.

How it works

1

Authenticate

Obtain a Benzinga API token from the Benzinga Console and append it as a token query parameter when opening the connection.
2

Connect

Open a WebSocket connection to the stream URL for the data you need — for example wss://api.benzinga.com/api/v1/analyst/insights/stream?token=YOUR_TOKEN.
3

Receive events

Messages arrive as JSON objects with a consistent envelope: an id, api_version, kind, and a data block that carries the action (created, updated, or deleted) and the payload.
4

Keep the connection alive

Send a ping plain-text frame periodically (every 30–60 s). The server responds with pong. The server also sends its own ping every 10 s — most WebSocket libraries handle this automatically.

Available streams

Message envelope

Every stream message follows the same top-level structure:
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "api_version": "websocket/v1",
  "kind": "<stream-type>",
  "data": {
    "action": "created",
    "id": "<record-id>",
    "timestamp": "2024-10-08T10:00:00Z",
    "content": { ... }
  }
}
FieldDescription
idUnique message ID — use this to deduplicate on reconnect
api_versionProtocol version of the message
kindIdentifies which stream the message came from
data.actionOne of created, updated, or deleted
data.contentStream-specific payload

Reference pages