> ## 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/v2.1/calendar/ratings/stream?token=YOUR_TOKEN
```

<div id="query-parameters">
  ### معاملات الاستعلام
</div>

| المعامل   | إلزامي | الوصف                                                                                |
| --------- | ------ | ------------------------------------------------------------------------------------ |
| `token`   | نعم    | رمز الوصول الخاص بك لواجهة برمجة تطبيقات ويب سوكيت من Benzinga (bz.production\*\*\*) |
| `tickers` | لا     | قائمة من رموز التداول مفصولة بفواصل (على سبيل المثال: `AAPL,TSLA`)                   |
| `isins`   | لا     | قائمة من أرقام التعريف الدولية للأوراق المالية ISIN مفصولة بفواصل لتصفية النتائج     |

<div id="message-example">
  ## مثال للرسالة
</div>

```json theme={null}
{
  "id": "e9e75b31-604e-422c-a532-362725b2d59d",
  "api_version": "websocket/v1",
  "kind": "data/v2.1/calendar/ratings",
  "data": {
    "action": "created",
    "id": "66fffdc08f3f630001a2ea51",
    "timestamp": "2024-10-04T19:21:06Z",
    "content": {
      "ticker": "AAPL",
      "name": "Apple",
      "exchange": "NASDAQ",
      "date": "2024-10-04",
      "time": "10:37:52",
      "action_company": "Upgrades",
      "rating_current": "Buy",
      "rating_prior": "Neutral",
      "pt_current": "200.00",
      "pt_prior": "180.00",
      "analyst": "Goldman Sachs",
      "firm_id": "57f832ab6b87f600016fa383",
      "importance": 4
    }
  }
}
```

<div id="rating-actions">
  ### إجراءات التصنيف
</div>

| الإجراء      | الوصف                              |
| ------------ | ---------------------------------- |
| `Upgrades`   | تحسين للتصنيف (مثال: محايد → شراء) |
| `Downgrades` | خفض للتصنيف (مثال: شراء → احتفاظ)  |
| `Maintains`  | يظل التصنيف دون تغيير              |
| `Initiates`  | أول تغطية بتصنيف                   |
| `Reiterates` | تأكيد التصنيف القائم               |

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

* **تتبع التغييرات**: قارن بين `rating_current` و`rating_prior` لاكتشاف الترقيات/التخفيضات
* **حركة السعر المستهدف**: راقب `pt_current` مقابل `pt_prior` لمتابعة تغيّرات السعر المستهدف
* **سمعة المحلل**: خذ في الاعتبار أهمية المؤسسة ودقتها التاريخية
* **عامل التصفية حسب الأهمية**: ركّز على التقييمات ذات الأهمية العالية (4-5) لتحقيق أكبر تأثير


## AsyncAPI

````yaml asyncapi/calendar-ratings-stream.yml calendarRatings
id: calendarRatings
title: Calendar ratings
description: Send action commands; receive real-time ratings updates
servers:
  - id: production
    protocol: wss
    host: api.benzinga.com/api/v2.1/calendar/ratings
    bindings: []
    variables: []
address: stream
parameters: []
bindings: []
operations:
  - &ref_2
    id: calendarRatings.publish
    title: Calendar ratings.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: calendarRatings
  - &ref_3
    id: calendarRatings.subscribe
    title: Calendar ratings.subscribe
    description: Receive real-time ratings data
    type: send
    messages:
      - &ref_5
        id: subscribe
        contentType: application/json
        payload:
          - name: subscribe
            description: Analyst ratings 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:
                  - data/v2.1/calendar/ratings
                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 rating
                    required: true
                  - name: timestamp
                    type: string
                    description: Timestamp of the data
                    required: true
                  - name: content
                    type: object
                    required: true
                    properties:
                      - name: id
                        type: string
                        description: Unique ID of this entry
                        required: true
                      - name: date
                        type: string
                        description: Date for rating
                        required: true
                      - name: time
                        type: string
                        description: Time for rating
                        required: false
                      - name: ticker
                        type: string
                        description: >-
                          Ticker symbol of the company that is the subject of
                          the rating
                        required: true
                      - name: exchange
                        type: string
                        description: Exchange (NYSE, NASDAQ, etc...)
                        required: true
                      - name: isin
                        type: string
                        description: International Securities Identification Number
                        required: false
                      - name: cusip
                        type: string
                        description: CUSIP identifier
                        required: false
                      - name: name
                        type: string
                        description: Name of the company that is the subject of the rating
                        required: true
                      - name: currency
                        type: string
                        description: Currency the data is denominated in
                        required: false
                      - name: action_pt
                        type: string
                        description: >-
                          Description of the change in price target from the
                          firm's last price target
                        required: false
                      - name: action_company
                        type: string
                        description: >-
                          Description of the change in rating from the firm's
                          last rating
                        required: false
                      - name: rating_current
                        type: string
                        description: The analyst's current rating for the company
                        required: false
                      - name: pt_current
                        type: string
                        description: Analyst's current price target
                        required: false
                      - name: adjusted_pt_current
                        type: string
                        description: >-
                          Analyst's current price target, adjusted for stock
                          splits and dividends
                        required: false
                      - name: rating_prior
                        type: string
                        description: Prior analyst rating for the company
                        required: false
                      - name: pt_prior
                        type: string
                        description: Analyst's prior price target
                        required: false
                      - name: adjusted_pt_prior
                        type: string
                        description: >-
                          Analyst's prior price target, adjusted for stock
                          splits and dividends
                        required: false
                      - name: url
                        type: string
                        description: >-
                          URL for the analyst ratings page for this ticker on
                          Benzinga.com
                        required: false
                      - name: url_calendar
                        type: string
                        description: >-
                          URL for the analyst ratings page for this ticker on
                          Benzinga.com
                        required: false
                      - name: url_news
                        type: string
                        description: >-
                          URL for the analyst ratings news articles for this
                          ticker on Benzinga.com
                        required: false
                      - name: analyst
                        type: string
                        description: Name of the analyst firm that published the rating
                        required: false
                      - name: analyst_id
                        type: string
                        description: ID of the analyst
                        required: false
                      - name: analyst_name
                        type: string
                        description: Name of the analyst (person) that published the rating
                        required: false
                      - name: firm_id
                        type: string
                        description: Unique identifier for the firm
                        required: false
                      - name: importance
                        type: integer
                        description: >-
                          Subjective basis of how important the event is to the
                          market (5 = High)
                        required: false
                      - name: notes
                        type: string
                        description: >-
                          Additional notes provided by the Benzinga Newsdesk
                          where applicable
                        required: false
                      - name: updated
                        type: integer
                        description: Last updated timestamp in UTC
                        required: false
        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:
                - data/v2.1/calendar/ratings
              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 rating
                  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:
                    - id
                    - date
                    - ticker
                    - exchange
                    - name
                  properties:
                    id:
                      type: string
                      description: Unique ID of this entry
                      x-parser-schema-id: <anonymous-schema-11>
                    date:
                      type: string
                      format: date
                      description: Date for rating
                      x-parser-schema-id: <anonymous-schema-12>
                    time:
                      type: string
                      description: Time for rating
                      x-parser-schema-id: <anonymous-schema-13>
                    ticker:
                      type: string
                      description: >-
                        Ticker symbol of the company that is the subject of the
                        rating
                      x-parser-schema-id: <anonymous-schema-14>
                    exchange:
                      type: string
                      description: Exchange (NYSE, NASDAQ, etc...)
                      x-parser-schema-id: <anonymous-schema-15>
                    isin:
                      type: string
                      description: International Securities Identification Number
                      x-parser-schema-id: <anonymous-schema-16>
                    cusip:
                      type: string
                      description: CUSIP identifier
                      x-parser-schema-id: <anonymous-schema-17>
                    name:
                      type: string
                      description: Name of the company that is the subject of the rating
                      x-parser-schema-id: <anonymous-schema-18>
                    currency:
                      type: string
                      description: Currency the data is denominated in
                      x-parser-schema-id: <anonymous-schema-19>
                    action_pt:
                      type: string
                      description: >-
                        Description of the change in price target from the
                        firm's last price target
                      x-parser-schema-id: <anonymous-schema-20>
                    action_company:
                      type: string
                      description: >-
                        Description of the change in rating from the firm's last
                        rating
                      x-parser-schema-id: <anonymous-schema-21>
                    rating_current:
                      type: string
                      description: The analyst's current rating for the company
                      x-parser-schema-id: <anonymous-schema-22>
                    pt_current:
                      type: string
                      description: Analyst's current price target
                      x-parser-schema-id: <anonymous-schema-23>
                    adjusted_pt_current:
                      type: string
                      description: >-
                        Analyst's current price target, adjusted for stock
                        splits and dividends
                      x-parser-schema-id: <anonymous-schema-24>
                    rating_prior:
                      type: string
                      description: Prior analyst rating for the company
                      x-parser-schema-id: <anonymous-schema-25>
                    pt_prior:
                      type: string
                      description: Analyst's prior price target
                      x-parser-schema-id: <anonymous-schema-26>
                    adjusted_pt_prior:
                      type: string
                      description: >-
                        Analyst's prior price target, adjusted for stock splits
                        and dividends
                      x-parser-schema-id: <anonymous-schema-27>
                    url:
                      type: string
                      format: uri
                      description: >-
                        URL for the analyst ratings page for this ticker on
                        Benzinga.com
                      x-parser-schema-id: <anonymous-schema-28>
                    url_calendar:
                      type: string
                      format: uri
                      description: >-
                        URL for the analyst ratings page for this ticker on
                        Benzinga.com
                      x-parser-schema-id: <anonymous-schema-29>
                    url_news:
                      type: string
                      format: uri
                      description: >-
                        URL for the analyst ratings news articles for this
                        ticker on Benzinga.com
                      x-parser-schema-id: <anonymous-schema-30>
                    analyst:
                      type: string
                      description: Name of the analyst firm that published the rating
                      x-parser-schema-id: <anonymous-schema-31>
                    analyst_id:
                      type: string
                      description: ID of the analyst
                      x-parser-schema-id: <anonymous-schema-32>
                    analyst_name:
                      type: string
                      description: Name of the analyst (person) that published the rating
                      x-parser-schema-id: <anonymous-schema-33>
                    firm_id:
                      type: string
                      description: Unique identifier for the firm
                      x-parser-schema-id: <anonymous-schema-34>
                    importance:
                      type: integer
                      minimum: 0
                      maximum: 5
                      description: >-
                        Subjective basis of how important the event is to the
                        market (5 = High)
                      x-parser-schema-id: <anonymous-schema-35>
                    notes:
                      type: string
                      description: >-
                        Additional notes provided by the Benzinga Newsdesk where
                        applicable
                      x-parser-schema-id: <anonymous-schema-36>
                    updated:
                      type: integer
                      format: int64
                      description: Last updated timestamp in UTC
                      x-parser-schema-id: <anonymous-schema-37>
                  x-parser-schema-id: <anonymous-schema-10>
              x-parser-schema-id: <anonymous-schema-6>
          x-parser-schema-id: <anonymous-schema-2>
        title: Subscribe
        description: Analyst ratings event
        example: No examples found
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribe
          - id: x-parser-message-name
            value: RatingsMessage
    bindings: []
    extensions: *ref_1
sendOperations:
  - *ref_2
receiveOperations:
  - *ref_3
sendMessages:
  - *ref_4
receiveMessages:
  - *ref_5
extensions:
  - id: x-parser-unique-object-id
    value: calendarRatings
securitySchemes:
  - id: tokenAuth
    name: token
    type: httpApiKey
    description: Benzinga WebSocket API token (bz.production***)
    in: query
    extensions: []

````