تمت ترجمة هذه الصفحة آليًا. النسخة الإنجليزية هي المصدر وقد تكون أكثر دقة أو أحدث. العرض بالإنجليزية

مُثرى - الاشتراك في المقالات

تتيح لك واجهة finlight.me WebSocket API الاشتراك في تحديثات المقالات في الوقت الفعلي. وبمجرّد الاتصال والاشتراك، تتلقّى فورًا أحدث مقال يطابق استعلامك، تليه أي مقالات منشورة حديثًا تستوفي معاييرك فور ظهورها.


نموذج المقال

يحتوي نموذج المقال في الاستجابة على جميع المعلومات حول المقال، مثل الرابط والعنوان وتاريخ النشر والمصدر. كما يحتوي على المشاعر ودرجة الثقة بشأنها.

  • Name
    link
    Type
    string
    Description

    عنوان URL للمقال الكامل.

  • Name
    source
    Type
    string
    Description

    موقع المصدر. مثل www.reuters.com

  • Name
    title
    Type
    string
    Description

    عنوان المقال.

  • Name
    summary
    Type
    string
    Description

    ملخّص المقال إن وُجد. يمكن أن يكون فارغًا (nullable).

  • Name
    publishDate
    Type
    Date
    Description

    تاريخ النشر كتاريخ ISO.

  • Name
    createdAt
    Type
    Date
    Description

    تاريخ الإنشاء الداخلي للمقال في نظام finlight كتاريخ ISO.

  • Name
    revisedDate
    Type
    Date | null
    Description

    تاريخ آخر مراجعة للمقال بعد النشر الأولي. يكون null عندما لا يُراجَع المقال قطّ. يظهر عند تفعيل includeUpdates ومراجعة المقال.

  • Name
    isUpdate
    Type
    boolean
    Description

    يكون true عندما يُطلَق هذا التسليم بسبب تحديث للمقال بعد النشر. يظهر فقط عند تفعيل includeUpdates.

  • Name
    language
    Type
    string
    Description

    رمز اللغة بصيغة ISO 639-1. مثل en | de | fr

  • Name
    sentiment
    Type
    string
    Description

    نتيجة تحليل المشاعر. يمكن أن تكون القيم positive | neutral |negative

  • Name
    confidence
    Type
    number
    Description

    مستوى الثقة في تحليل المشاعر من 0 إلى 1.

  • Name
    images
    Type
    string[]
    Description

    مصفوفة عناوين URL لصور المقال.

  • Name
    countries
    Type
    string[]
    Description

    مصفوفة رموز الدول بصيغة ISO 3166-1 alpha-2 التي تمثّل الدول المرتبطة بالمقال. مثل ["US", "GB", "DE"]. يمكن أن تكون فارغة.

  • Name
    categories
    Type
    string[]
    Description

    مصفوفة فئات المقال. القيم الممكنة: markets | economy | business | politics | geopolitics | regulation | technology | energy | commodities | crypto | health | climate | security. يمكن أن تكون فارغة.

  • Name
    companies
    Type
    Company[]
    Description

    مصفوفة الشركات المذكورة في المقال. تُعرَض/تتوفّر فقط مع فئة اشتراك محدّدة. يمكن أن تكون فارغة (nullable).

نموذج الشركة

يحتوي نموذج الشركة في الاستجابة على معلومات حول شركة مذكورة في مقال. ويتضمّن تفاصيل مثل اسم الشركة ورمز التداول والصناعة وغيرها.

  • Name
    companyId
    Type
    number
    Description

    معرّف فريد للشركة.

  • Name
    confidence
    Type
    string
    Description

    مستوى الثقة في تحديد الشركة من 0 إلى 1.

  • Name
    country
    Type
    string
    Description

    البلد الذي تتّخذه الشركة مقرًّا، بصيغة ISO 3166-1 alpha-2. مثل US | DE | GB

  • Name
    exchange
    Type
    string
    Description

    البورصة التي تُدرَج فيها الشركة.

  • Name
    industry
    Type
    Date
    Description

    القطاع الصناعي للشركة. مثل Biotechnology, Technology

  • Name
    name
    Type
    string
    Description

    الاسم الكامل للشركة. مثل Apple Inc.

  • Name
    sector
    Type
    string
    Description

    قطاع الشركة. مثل Technology | Health Care

  • Name
    ticker
    Type
    string
    Description

    رمز التداول للشركة. مثل AAPL | GOOGL

  • Name
    isin
    Type
    string
    Description

    الرقم الدولي لتعريف الأوراق المالية (ISIN) للشركة. مثل US0378331005

  • Name
    openfigi
    Type
    string
    Description

    معرّف OpenFIGI للشركة. مثل BBG000B9XRY4

  • Name
    primaryListing
    Type
    object
    Description

    معلومات الإدراج الأساسي للشركة في البورصة.

  • Name
    primaryListing.ticker
    Type
    string
    Description

    رمز التداول الأساسي في البورصة الرئيسية.

  • Name
    primaryListing.exchangeCode
    Type
    string
    Description

    رمز البورصة الأساسية التي يُدرَج فيها السهم.

  • Name
    primaryListing.exchangeCountry
    Type
    string
    Description

    بلد البورصة الأساسية التي يُدرَج فيها السهم.

  • Name
    isins
    Type
    string[]
    Description

    مصفوفة الأرقام الدولية لتعريف الأوراق المالية (ISIN) للشركة.

  • Name
    otherListings
    Type
    object[]
    Description

    مصفوفة عمليات الإدراج الأخرى للشركة في البورصات.

  • Name
    otherListings[].ticker
    Type
    string
    Description

    رمز التداول في البورصة البديلة.

  • Name
    otherListings[].exchangeCode
    Type
    string
    Description

    رمز البورصة البديلة التي يُدرَج فيها السهم.

  • Name
    otherListings[].exchangeCountry
    Type
    string
    Description

    بلد البورصة البديلة التي يُدرَج فيها السهم.


WEBSOCKETالمسار الافتراضي

جلب المقالات

عند الاشتراك، ستتلقّى أولًا أحدث مقال يطابق استعلامك، تليه أي مقالات جديدة فور نشرها.

عند الاشتراك، يمكنك تحديد معاملات مختلفة لتصفية المقالات التي تتلقّاها:

  • Name
    query
    Type
    string
    Description

    استعلام البحث للعثور على المقالات ذات الصلة. الاستعلامات المتقدمة

  • Name
    sources
    Type
    string[]
    Description

    التصفية حسب مصدر واحد أو عدّة مصادر للمقالات. مثل ["www.reuters.com", "www.cnbc.com"]. راجع نقطة نهاية المصادر للقيم الصالحة. يدعم حرف البدل "*" لتضمين جميع المصادر.

  • Name
    excludeSources
    Type
    string[]
    Description

    يستبعد مصدرًا واحدًا أو عدّة مصادر. مثل ["www.reuters.com", "www.cnbc.com"]. راجع نقطة نهاية المصادر للقيم الصالحة.

  • Name
    tickers
    Type
    string[]
    Description

    التصفية حسب رموز التداول (مصفوفة سلاسل). سيُرجِع هذا المقالات التي تذكر هذه الرموز. يدعم حرف البدل "*" لتضمين جميع الرموز.

  • Name
    countries
    Type
    string[]
    Description

    التصفية حسب بلد الشركة باستخدام رموز الدول ISO 3166-1 alpha-2 (مصفوفة سلاسل). مثل ["US", "GB", "DE"]

  • Name
    includeEntities
    Type
    boolean
    Description

    يتضمّن الشركات المذكورة في المقال. يتطلّب فئة اشتراك محدّدة.

  • Name
    language
    Type
    string
    Description

    التصفية حسب اللغة (ISO 639-1). القيمة الافتراضية هي en، التي تُرجع الإنجليزية فقط وتستبعد اللغات الأخرى — راجع اللغة والتغطية.

  • Name
    includeUpdates
    Type
    boolean
    Description

    عند تفعيله، يُعاد تسليم المقالات المُحدَّثة مع isUpdate=true وطابع زمني revisedDate. مفيد لمراقبة تصحيحات المقالات أو إضافات المحتوى بعد النشر الأولي.

  • Name
    extended
    Type
    boolean
    Description

    (مهمَل) true لاستقبال معلومات موسّعة عن المقال (تتضمّن summary).

Request

WEBSOCKET
/
import { FinlightApi } from 'finlight-client'

const client = new FinlightApi({
  apiKey: 'YOUR_API_KEY', // Replace with your API key
})

client.websocket.connect(
  {
    query: 'Nvidia',
    language: 'en',
    extended: true,
    countries: ['US', 'GB'],
  },
  (article) => {
    console.log('New article received:', article)
  },
)

Response

{
  "link": "https://www.example.com/article1",
  "source": "www.example.com",
  "title": "Stock Market Hits New Highs",
  "summary": "A brief summary of the article...",
  "publishDate": "2023-10-01T12:34:56Z",
  "createdAt": "2023-10-01T12:35:10Z",
  "language": "en",
  "sentiment": "positive",
  "confidence": 0.95,
  "images": [
              "https://www.example.com/image1.jpg",
              "https://www.example.com/image2.jpg"
            ],
  "countries": ["US"],
  "categories": ["markets", "technology"],
  "companies": [
            {
                "companyId": 41494,
                "confidence": "0.9335401058197021",
                "country": "US",
                "exchange": "XNAS",
                "industry": "Biotechnology: Pharmaceutical Preparations",
                "name": "Summit Therapeutics Inc. Common Stock",
                "sector": "Health Care",
                "ticker": "SMMT",
                "isin": "US86627T1088",
                "openfigi": "BBG01PH11VP5",
                "primaryListing": {
                    "ticker": "SMMT",
                    "exchangeCode": "XNAS",
                    "exchangeCountry": "US"
                },
                "isins": ["US86627T1088", "US86627T2088"],
                "otherListings": [
                    {
                        "ticker": "SMMT.L",
                        "exchangeCode": "XLON",
                        "exchangeCountry": "GB"
                    }
                ]
            }
          ]
}

Response (includeUpdates: true)

{
  "link": "https://www.example.com/article1",
  "source": "www.example.com",
  "title": "Stock Market Hits New Highs — Updated",
  "summary": "An updated summary of the article...",
  "publishDate": "2023-10-01T12:34:56Z",
  "createdAt": "2023-10-01T12:35:10Z",
  "revisedDate": "2023-10-02T08:00:00Z",
  "isUpdate": true,
  "language": "en",
  "sentiment": "positive",
  "confidence": 0.95,
  "images": [
    "https://www.example.com/image1.jpg"
  ],
  "countries": ["US"],
  "categories": ["markets"],
  "companies": []
}

يمكنك إبقاء الاتصال مفتوحًا واستقبال المقالات في الوقت الفعلي دون طلبات إضافية. وفور توفّر مقالات جديدة، تُدفَع مباشرةً إلى دالة الاستدعاء الراجع (callback) الخاصة بك.