Stock News

Use NewsClient to get stock news and market highlights. Follow this SDK's quickstart to configure the client. News queries use the main gateway and do not take over real-time quote device access.

getStockNews

getStockNews(req: NewsStockListRequest): Promise<NewsPage>

Description

Gets news for one stock using news_stock_list. Only one symbol is supported. Paginate using the page number and page size; the first page starts with the latest articles.

Parameters

ParameterTypeRequiredDescription
req.symbolstringYesOne stock symbol, such as AAPL
req.langstringNoUses the client language when omitted; supported values are zh_CN / zh_TW / en_US
req.pageCountnumberNoundefined is omitted; the server defaults to 1. Explicit values must be at least 1
req.pageSizenumberNoundefined is omitted; the server defaults to 20. Explicit values must be 1–50

Returns

Promise<NewsPage>; the promise rejects on failure.

FieldTypeDescription
itemsNewsItem[]Articles on the current page
pageCountnumber | undefinedCurrent page number; always 1 for market highlights
pageSizenumber | undefinedPage size
totalPagenumber | undefinedTotal page count
totalSizenumber | undefinedTotal item count

Each news item has the following fields:

FieldTypeDescription
idstring | undefinedArticle ID; can be used as the cursor for the next market-highlights page
titlestring | undefinedTitle
summarystring | undefinedSummary
pubTimestampnumber | undefinedPublication time, as a Unix timestamp in seconds
urlstring | undefinedArticle URL

Example

import { createClientConfig, NewsClient } from '@tigeropenapi/tigeropen';

async function main(): Promise<void> {
    const config = createClientConfig();
    const newsClient = NewsClient.fromConfig(config);
    const page = await newsClient.getStockNews({ symbol: 'AAPL', lang: 'en_US', pageCount: 1, pageSize: 20 });
    for (const item of page.items) console.log(item.pubTimestamp, item.title, item.url);
}

void main();

Response example

This JSON example is based on fixed SDK test fixtures and illustrates the response data structure. Actual calls return the SDK objects listed above.

{
  "items": [
    {
      "id": "123456",
      "title": "Apple Q2",
      "summary": "Earnings beat",
      "pubTimestamp": 1729413600,
      "url": "https://example.com/news/123456"
    }
  ],
  "pageCount": 1,
  "pageSize": 20,
  "totalPage": 1,
  "totalSize": 1
}

Request rate

Base limit: 60 requests/minute.


Did this page help you?