Stock News
Use TigerOpenAPI.News.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.
GetStockNewsAsync
Task<NewsStockListResponse> GetStockNewsAsync(string symbol, Language? lang = null, int? pageCount = null, int? pageSize = null)
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
| Parameter | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | One stock symbol, such as AAPL |
lang | Language? | No | null uses the configured language; supported values are zh_CN / zh_TW / en_US |
pageCount | int? | No | null is omitted; the server defaults to 1. Explicit values must be at least 1 |
pageSize | int? | No | null is omitted; the server defaults to 20. Explicit values must be 1–50 |
Returns
The response extends TigerResponse. Check IsSuccess() first; the page object is response.Data (NewsPageItem).
| Field | Type | Description |
|---|---|---|
Items | List<NewsItem> | Articles on the current page |
PageCount | int | Current page number; always 1 for market highlights |
PageSize | int | Page size |
TotalPage | int | Total page count |
TotalSize | int | Total item count |
Each news item has the following fields:
| Field | Type | Description |
|---|---|---|
Id | string | Article ID; can be used as the cursor for the next market-highlights page |
Title | string | Title |
Summary | string | Summary |
PubTimestamp | long | Publication time, as a Unix timestamp in seconds |
Url | string | Article URL |
Example
using System;
using TigerOpenAPI.Common.Enum;
using TigerOpenAPI.Config;
using TigerOpenAPI.News;
TigerConfig config = new() { ConfigFilePath = "your_config_directory_path", Language = Language.en_US };
NewsClient newsClient = new(config);
var response = await newsClient.GetStockNewsAsync("AAPL", Language.en_US, pageCount: 1, pageSize: 20);
if (response is null || !response.IsSuccess()) throw new InvalidOperationException(response?.Message ?? "empty response");
foreach (var item in response.Data.Items) Console.WriteLine($"{item.PubTimestamp} {item.Title} {item.Url}");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.
Updated 1 day ago
