Skip to main content
This page lists the supported actions you can use to interact with the Benzinga WebSocket API. These actions help maintain session health and access recent message history.
Note: You cannot control the number of messages returned by the list action. The actual count depends on the number of messages currently cached for a given key.

Available Actions

ActionDescriptionExample
replayReplays up to the last 100 messages. The number of messages returned may vary depending on cache availability for the key.replay
pingKeeps the WebSocket session alive by sending a heartbeat signal.ping

Example Usage

Send an action through your WebSocket client using the following format: Sample usage of ping:
ping
Response:
pong
Sample usage of replay:
replay
Response:
{
  "id": "unique-uuid-for-response",
  "api_version": "websocket/v1",
  "kind": "stream_type",
  "data": {
    "action": "created/updated/deleted",
    "id": "insight-id",
    "content": {
      ...  
    },
    "timestamp": "2024-10-08T10:00:00Z"
  }
}