Market Highlights
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.
GetMarketNewsAsync
Task<NewsHighlightListResponse> GetMarketNewsAsync(Language? lang = null, string lastId = null)
Description
Gets market highlights using news_highlight_list. Omit the cursor to start with the latest articles. For the next page, pass the ID of the last article on the previous page. The request has no page number or page size; the response page number is always 1. An empty items list is a successful result.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
lastId | string | No | The last article's Id on the previous page; null starts from the latest articles |
lang | Language? | No | null uses the configured language; supported values are zh_CN / zh_TW / en_US |
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.GetMarketNewsAsync(Language.en_US);
if (response is null || !response.IsSuccess()) throw new InvalidOperationException(response?.Message ?? "empty response");
var items = response.Data.Items;
if (items.Count > 0) {
var next = await newsClient.GetMarketNewsAsync(Language.en_US, lastId: items[items.Count - 1].Id);
if (next is null || !next.IsSuccess()) throw new InvalidOperationException(next?.Message ?? "empty response");
Console.WriteLine(next.Data.Items.Count);
}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
