Benzinga · AsyncAPI Specification

Benzinga Consensus Ratings WebSocket Stream

Version 1.0.0

WebSocket API providing real-time consensus ratings data for specific ticker symbols. **Authentication** - Clients must provide their API token as a query parameter: ``` wss://api.benzinga.com/api/v1/consensus-ratings/stream?token=YOUR_API_TOKEN ``` - Upon connect, you'll receive status messages for connection and authentication. **Filtering** - Filter by tickers: Use `tickers` query parameter (comma-separated) - Filter by ISINs: Use `isins` query parameter (comma-separated) - Simplify ratings: Use `simplify` query parameter to simplify ratings to Buy, Hold, Sell - Aggregate type: Use `aggregate_type` query parameter (number or percentage) **Actions** - `ping`: Keeps the WebSocket connection alive - `replay`: Replays up to the last 100 messages (cache-dependent)

View Spec View on GitHub FinancialMarket DataStocksNewsReal-TimeSentimentAnalyst RatingsEarningsOptionsStreamingAsyncAPIEventsWebSockets

Channels

consensusRatings
Send action commands; receive real-time consensus ratings updates

Messages

ActionRequest
ActionRequest
Send action commands (ping, replay)
ConsensusRatingsMessage
ConsensusRatingsMessage
Consensus ratings event

Servers

wss
production
Real-time consensus ratings stream endpoint

AsyncAPI Specification

Raw ↑
asyncapi: '3.0.0'
info:
  title: Benzinga Consensus Ratings WebSocket Stream
  version: 1.0.0
  description: |
    WebSocket API providing real-time consensus ratings data for specific ticker symbols.

    **Authentication**
    - Clients must provide their API token as a query parameter:
      ```
      wss://api.benzinga.com/api/v1/consensus-ratings/stream?token=YOUR_API_TOKEN
      ```
    - Upon connect, you'll receive status messages for connection and authentication.

    **Filtering**
    - Filter by tickers: Use `tickers` query parameter (comma-separated)
    - Filter by ISINs: Use `isins` query parameter (comma-separated)
    - Simplify ratings: Use `simplify` query parameter to simplify ratings to Buy, Hold, Sell
    - Aggregate type: Use `aggregate_type` query parameter (number or percentage)

    **Actions**
    - `ping`: Keeps the WebSocket connection alive
    - `replay`: Replays up to the last 100 messages (cache-dependent)

servers:
  production:
    host: api.benzinga.com/api/v1/consensus-ratings
    protocol: wss
    description: Real-time consensus ratings stream endpoint
    security:
      - $ref: '#/components/securitySchemes/tokenAuth'

channels:
  consensusRatings:
    address: stream
    messages:
      publish:
        $ref: '#/components/messages/ActionRequest'
      subscribe:
        $ref: '#/components/messages/ConsensusRatingsMessage'
    description: Send action commands; receive real-time consensus ratings updates

operations:
  consensusRatings.publish:
    action: receive
    channel:
      $ref: '#/channels/consensusRatings'
    summary: Send commands to the server
    messages:
      - $ref: '#/channels/consensusRatings/messages/publish'
  consensusRatings.subscribe:
    action: send
    channel:
      $ref: '#/channels/consensusRatings'
    summary: Receive real-time consensus ratings data
    messages:
      - $ref: '#/channels/consensusRatings/messages/subscribe'

components:
  securitySchemes:
    tokenAuth:
      type: httpApiKey
      name: token
      in: query
      description: Benzinga WebSocket API token (bz.production***)

  messages:
    ActionRequest:
      summary: Send action commands (ping, replay)
      contentType: text/plain
      payload:
        type: string
        enum: [ping, replay]
        description: Action to perform (ping for heartbeat, replay for message history)

    ConsensusRatingsMessage:
      summary: Consensus ratings event
      contentType: application/json
      payload:
        type: object
        required: [id, api_version, kind, data]
        properties:
          id:
            type: string
            format: uuid
            description: Unique UUID for the websocket response
          api_version:
            type: string
            enum: [websocket/v1]
            description: Websocket API version
          kind:
            type: string
            enum: [data/v2.1/calendar/ratings]
            description: Websocket connection stream type
          data:
            type: object
            required: [aggregate_ratings, aggregate_type, consensus_rating]
            properties:
              aggregate_ratings:
                type: object
                description: Contains all the ratings categorized by SELL, HOLD, BUY
                properties:
                  strong_buy:
                    type: integer
                    description: Total strong_buy count/percentage
                  buy:
                    type: integer
                    description: Total buy count/percentage
                  hold:
                    type: integer
                    description: Total hold count/percentage
                  sell:
                    type: integer
                    description: Total sell count/percentage
                  strong_sell:
                    type: integer
                    description: Total strong_sell count/percentage
              aggregate_type:
                type: string
                enum: [number, percentage]
                description: Type of aggregation, Number or Percentage
              consensus_price_target:
                type: number
                description: Average price target
              consensus_rating:
                type: string
                enum: [SELL, HOLD, BUY]
                description: Scale value, SELL, HOLD, BUY
              consensus_rating_val:
                type: number
                description: Value in float
              high_price_target:
                type: number
                description: Highest price target in the specific timeline
              low_price_target:
                type: number
                description: Lowest price target in the specific timeline
              total_analyst_count:
                type: integer
                description: Total analyst ratings in the timeline
              unique_analyst_count:
                type: integer
                description: Unique analyst count in the timeline
              updated_at:
                type: string
                format: date-time
                description: Last updated timestamp in UTC

Work with this as data

Every AsyncAPI spec here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for asyncapi

4 MCP tools reach this
  • find_asyncapisBrowse and filter every AsyncAPI spec in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This AsyncAPI spec
curl "https://apis.io/api/v1/asyncapis/benzinga-consensus-ratings-stream-asyncapi"
All asyncapi
curl "https://apis.io/api/v1/asyncapis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.