> ## 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.

# تدفق آراء المتفائلين والمتشائمين

> سيناريوهات في الوقت الفعلي لحالات التفاؤل والتشاؤم المتعلقة بالأوراق المالية.

<div id="overview">
  ## نظرة عامة
</div>

اشترك في تحليلات فورية للحالات الصعودية والهبوطية للأوراق المالية. احصل على رؤى متوازنة حول السيناريوهات الإيجابية (الصعودية) والسيناريوهات السلبية (الهبوطية) للأسهم.

<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">
  ### معاملات الاستعلام
</div>

| المعامل   | مطلوب | الوصف                                                                                  |
| --------- | ----- | -------------------------------------------------------------------------------------- |
| `token`   | Yes   | رمز الوصول الخاص بك لواجهة برمجة التطبيقات ويب سوكيت من Benzinga (bz.production\*\*\*) |
| `tickers` | No    | قائمة من رموز التداول مفصولة بفواصل (مثل `AAPL,TSLA`)                                  |
| `isins`   | No    | قائمة من أرقام التعريف الدولية للأوراق المالية 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">
  ### إجراءات الرسائل
</div>

| الإجراء               | الوصف                           |
| --------------------- | ------------------------------- |
| `created` / `Created` | تم نشر حالة صعودية/هبوطية جديدة |
| `updated` / `Updated` | تم تعديل حالة قائمة             |
| `deleted` / `Deleted` | تمت إزالة الحالة                |

<div id="interactive-commands">
  ## الأوامر التفاعلية
</div>

| الأمر    | الوصف                                |
| -------- | ------------------------------------ |
| `ping`   | إبقاء الاتصال فعالًا (يرد بـ `pong`) |
| `replay` | إعادة إرسال حتى آخر 100 رسالة مخزنة  |

<div id="best-practices">
  ## أفضل الممارسات
</div>

* **إزالة التكرار**: استخدِم حقل `id` لمنع معالجة الرسائل المكررة
* **نبض الاتصال (Heartbeat)**: أرسِل أوامر `ping` كل 30 إلى 60 ثانية
* **عرض متوازن**: اعرض وجهي النظر الصعودي والهبوطي لتقديم تحليل عادل
* **تتبّع التحديثات**: راقِب الطابع الزمني `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: []

````