このページは機械翻訳です。英語版がソースであり、より正確または最新の場合があります。 英語で表示

エンリッチ - 記事を購読する

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

    記事の要約(存在する場合)。null になることがあります。

  • Name
    publishDate
    Type
    Date
    Description

    公開日(ISO 日付)。

  • Name
    createdAt
    Type
    Date
    Description

    finlight システムにおける記事の内部作成日(ISO 日付)。

  • Name
    revisedDate
    Type
    Date | null
    Description

    最初の公開後に記事が最後に改訂された日付。記事が一度も改訂されていない場合は nullincludeUpdates が有効で記事が改訂された場合に存在します。

  • Name
    isUpdate
    Type
    boolean
    Description

    この配信が記事の公開後の更新によってトリガーされた場合は trueincludeUpdates が有効な場合にのみ存在します。

  • 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

    記事内で言及されている企業の配列。特定のサブスクリプション階層でのみ表示/利用可能です。null になることがあります。

企業モデル

応答の企業モデルには、記事内で言及されている企業に関する情報が含まれます。企業名、ティッカーシンボル、業種などの詳細が含まれます。

  • 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"]。有効な値は source エンドポイントを参照してください。ワイルドカード "*" をサポートし、すべてのソースを含められます。

  • Name
    excludeSources
    Type
    string[]
    Description

    単一または複数のソースを除外します。例:["www.reuters.com", "www.cnbc.com"]。有効な値は source エンドポイントを参照してください。

  • 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=truerevisedDate タイムスタンプ付きで再配信されます。最初の公開後の記事の訂正や内容追加を監視するのに便利です。

  • Name
    extended
    Type
    boolean
    Description

    (非推奨)拡張された記事情報を受信する場合は truesummary を含む)。

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": []
}

接続を開いたままにして、追加のリクエストなしにリアルタイムで記事を受信できます。新しい記事が利用可能になると、コールバック関数へ直接プッシュされます。