Market News
Get Market News
Request Class:NewsHighlightListRequest
Description
Retrieves the market news highlights list, corresponding to the news_highlight_list method.
- No required parameters; passing
nullforlastIdstarts from the latest article. - Pagination uses the
lastIdcursor only: pass theidof the last item from the previous page aslastIdon the next call. pageCountin the response is always 1; page through withlastIdinstead of page numbers.
Parameters
NewsHighlightListRequest.newRequest(Language lang, String lastId)
| Parameter | Type | Required | Description |
|---|---|---|---|
| lang | Language | No | Language enum: zh_CN / zh_TW / en_US |
| lastId | String | No | Pagination cursor, the id of the last item from the previous page; pass null to start from the latest article |
Response
com.tigerbrokers.stock.openapi.client.https.response.news.NewsHighlightListResponse
The returned data can be accessed via NewsHighlightListResponse.getNewsPageItem(), which returns a NewsPageItem object with the same structure as Get Stock News.
Example Request
TigerHttpClient client = TigerHttpClient.getInstance().clientConfig(
ClientConfig.DEFAULT_CONFIG);
// First page: pass null for lastId to start from the latest article
NewsHighlightListRequest request = NewsHighlightListRequest.newRequest(Language.en_US, null);
NewsHighlightListResponse response = client.execute(request);
if (response.isSuccess()) {
for (NewsItem item : response.getNewsPageItem().getItems()) {
System.out.println(item.getId() + " " + item.getTitle());
}
} else {
System.out.println("response error:" + response.getMessage());
}Example Response
{
"items": [
{
"id": "",
"title": "",
"summary": "",
"pubTimestamp": 1793880506,
"url": "https://xxxx"
}
],
"pageCount": 1,
"pageSize": 20,
"totalPage": 8,
"totalSize": 143
}Rate Limit
The base rate limit is 60 requests/min.
Updated 1 day ago
Did this page help you?
