> ## Documentation Index
> Fetch the complete documentation index at: https://docs.benzinga.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bulls/Bears Say 스트림

> 증권에 대한 실시간 강세/약세 시나리오 제공.

<div id="overview">
  ## 개요
</div>

증권에 대한 실시간 강세(bull)·약세(bear) 시나리오 분석을 구독할 수 있습니다. 주식의 긍정적(강세) 및 부정적(약세) 시나리오를 균형 있게 파악할 수 있습니다.

<div id="key-features">
  ### 주요 기능
</div>

* **균형 잡힌 분석**: 강세와 약세 케이스를 모두 제공받아 종합적인 시장 인사이트를 확보합니다.
* **실시간 업데이트**: 케이스가 생성, 업데이트 또는 삭제될 때 즉시 알림을 받습니다.
* **종목별 필터링**: 특정 티커 또는 국제증권식별번호(ISIN)를 기준으로 구독합니다.
* **시장 심리**: 낙관적·비관적 관점을 모두 파악합니다.

<div id="use-cases">
  ### 사용 사례
</div>

* 양측의 논거를 모두 보여주는 센티먼트 분석 대시보드 구축
* 시간 경과에 따른 강세/약세 심리 변화 추적
* 시장 시각의 유의미한 변화에 대해 사용자에게 알림
* 고객에게 균형 잡힌 투자 리서치 제공

<div id="quick-start">
  ## 빠른 시작
</div>

위의 대화형 웹소켓 테스트 도구를 사용해 실시간 스트림에 연결하고 테스트해 보세요.

<div id="connection-url">
  ### 접속 URL
</div>

```
wss://api.benzinga.com/api/v1/bulls_bears_say/stream?token=YOUR_TOKEN
```

<div id="query-parameters">
  ### Query Parameters
</div>

| Parameter | Required | Description                               |
| --------- | -------- | ----------------------------------------- |
| `token`   | 예        | Benzinga 웹소켓 API 토큰 (bz.production\*\*\*) |
| `tickers` | 아니오      | 쉼표로 구분된 티커 목록 (예: `AAPL,TSLA`)            |
| `isins`   | 아니오      | 쉼표로 구분된 국제증권식별번호(ISIN) 목록                 |

<div id="message-example">
  ## 메시지 예제
</div>

```json theme={null}
{
  "id": "websocket123",
  "api_version": "websocket/v1",
  "kind": "bull_bear_case",
  "data": {
    "action": "created",
    "id": "case123",
    "timestamp": "2024-10-01T10:00:00Z",
    "content": {
      "bull_case": "Strong earnings growth and market expansion expected.",
      "bear_case": "Increased competition and regulatory pressures.",
      "ticker": "AAPL",
      "updated": 1696153200
    }
  }
}
```

<div id="message-actions">
  ### 메시지 action
</div>

| Action                | 설명                   |
| --------------------- | -------------------- |
| `created` / `Created` | 새 bull/bear 케이스가 발행됨 |
| `updated` / `Updated` | 기존 케이스가 수정됨          |
| `deleted` / `Deleted` | 케이스가 삭제됨             |

<div id="interactive-commands">
  ## 대화형 명령어
</div>

| Command  | Description                  |
| -------- | ---------------------------- |
| `ping`   | 연결을 유지합니다 (`pong`으로 응답합니다)   |
| `replay` | 마지막으로 캐시된 메시지 최대 100개를 재생합니다 |

<div id="best-practices">
  ## 모범 사례
</div>

* **중복 제거**: `id` 필드를 사용해 중복 메시지가 처리되지 않도록 합니다
* **하트비트(heartbeat)**: 30\~60초마다 `ping` 명령을 전송합니다
* **균형 잡힌 제공**: 강세(bull)와 약세(bear) 양측 사례를 모두 제시해 공정한 분석을 제공합니다
* **업데이트 추적**: 최근 변경 사항을 식별하기 위해 `updated` 타임스탬프를 모니터링합니다


## AsyncAPI

````yaml asyncapi/bulls-bears-say-stream.yml bullsBearsSay
id: bullsBearsSay
title: Bulls bears say
description: Send action commands; receive real-time bull/bear case updates
servers:
  - id: production
    protocol: wss
    host: api.benzinga.com/api/v1/bulls_bears_say
    bindings: []
    variables: []
address: stream
parameters: []
bindings: []
operations:
  - &ref_2
    id: bullsBearsSay.publish
    title: Bulls bears say.publish
    description: Send commands to the server
    type: receive
    messages:
      - &ref_4
        id: publish
        contentType: text/plain
        payload:
          - type: string
            enum: &ref_0
              - ping
              - replay
            description: Send action commands (ping, replay)
            x-parser-schema-id: <anonymous-schema-1>
            name: publish
        headers: []
        jsonPayloadSchema:
          type: string
          enum: *ref_0
          description: Action to perform (ping for heartbeat, replay for message history)
          x-parser-schema-id: <anonymous-schema-1>
        title: Publish
        description: Send action commands (ping, replay)
        example: '{}'
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: publish
          - id: x-parser-message-name
            value: ActionRequest
    bindings: []
    extensions: &ref_1
      - id: x-parser-unique-object-id
        value: bullsBearsSay
  - &ref_3
    id: bullsBearsSay.subscribe
    title: Bulls bears say.subscribe
    description: Receive real-time bull/bear case data
    type: send
    messages:
      - &ref_5
        id: subscribe
        contentType: application/json
        payload:
          - name: subscribe
            description: Bull/Bear case event
            type: object
            properties:
              - name: id
                type: string
                description: Unique UUID for the websocket response
                required: true
              - name: api_version
                type: string
                description: Websocket API version
                enumValues:
                  - websocket/v1
                required: true
              - name: kind
                type: string
                description: Websocket connection stream type
                enumValues:
                  - bull_bear_case
                required: true
              - name: data
                type: object
                required: true
                properties:
                  - name: action
                    type: string
                    description: Websocket data action
                    enumValues:
                      - created
                      - updated
                      - deleted
                      - Created
                      - Updated
                      - Deleted
                    required: true
                  - name: id
                    type: string
                    description: Data ID for the bull/bear case
                    required: true
                  - name: timestamp
                    type: string
                    description: Timestamp of the data
                    required: true
                  - name: content
                    type: object
                    required: true
                    properties:
                      - name: bear_case
                        type: string
                        description: Description of the bear case scenario
                        required: true
                      - name: bull_case
                        type: string
                        description: Description of the bull case scenario
                        required: true
                      - name: id
                        type: string
                        description: Unique identifier for the bull/bear case
                        required: true
                      - name: ticker
                        type: string
                        description: Stock ticker symbol related to the bull/bear case
                        required: true
                      - name: updated
                        type: integer
                        description: Timestamp of when the case was last updated
                        required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - id
            - api_version
            - kind
            - data
          properties:
            id:
              type: string
              format: uuid
              description: Unique UUID for the websocket response
              x-parser-schema-id: <anonymous-schema-3>
            api_version:
              type: string
              enum:
                - websocket/v1
              description: Websocket API version
              x-parser-schema-id: <anonymous-schema-4>
            kind:
              type: string
              enum:
                - bull_bear_case
              description: Websocket connection stream type
              x-parser-schema-id: <anonymous-schema-5>
            data:
              type: object
              required:
                - action
                - id
                - content
                - timestamp
              properties:
                action:
                  type: string
                  enum:
                    - created
                    - updated
                    - deleted
                    - Created
                    - Updated
                    - Deleted
                  description: Websocket data action
                  x-parser-schema-id: <anonymous-schema-7>
                id:
                  type: string
                  description: Data ID for the bull/bear case
                  x-parser-schema-id: <anonymous-schema-8>
                timestamp:
                  type: string
                  format: date-time
                  description: Timestamp of the data
                  x-parser-schema-id: <anonymous-schema-9>
                content:
                  type: object
                  required:
                    - bear_case
                    - bull_case
                    - id
                    - ticker
                    - updated
                  properties:
                    bear_case:
                      type: string
                      description: Description of the bear case scenario
                      x-parser-schema-id: <anonymous-schema-11>
                    bull_case:
                      type: string
                      description: Description of the bull case scenario
                      x-parser-schema-id: <anonymous-schema-12>
                    id:
                      type: string
                      format: uuid
                      description: Unique identifier for the bull/bear case
                      x-parser-schema-id: <anonymous-schema-13>
                    ticker:
                      type: string
                      description: Stock ticker symbol related to the bull/bear case
                      x-parser-schema-id: <anonymous-schema-14>
                    updated:
                      type: integer
                      format: int64
                      description: Timestamp of when the case was last updated
                      x-parser-schema-id: <anonymous-schema-15>
                  x-parser-schema-id: <anonymous-schema-10>
              x-parser-schema-id: <anonymous-schema-6>
          x-parser-schema-id: <anonymous-schema-2>
        title: Subscribe
        description: Bull/Bear case event
        example: No examples found
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribe
          - id: x-parser-message-name
            value: BullBearMessage
    bindings: []
    extensions: *ref_1
sendOperations:
  - *ref_2
receiveOperations:
  - *ref_3
sendMessages:
  - *ref_4
receiveMessages:
  - *ref_5
extensions:
  - id: x-parser-unique-object-id
    value: bullsBearsSay
securitySchemes:
  - id: tokenAuth
    name: token
    type: httpApiKey
    description: Benzinga WebSocket API token (bz.production***)
    in: query
    extensions: []

````