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 null for lastId starts from the latest article.
  • Pagination uses the lastId cursor only: pass the id of the last item from the previous page as lastId on the next call.
  • pageCount in the response is always 1; page through with lastId instead of page numbers.

Parameters

NewsHighlightListRequest.newRequest(Language lang, String lastId)

ParameterTypeRequiredDescription
langLanguageNoLanguage enum: zh_CN / zh_TW / en_US
lastIdStringNoPagination 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.


Did this page help you?