Receive Historical News

View as MarkdownOpen in Claude

EWrapper.historicalNews (

requestId: int. Request identifier used to track data.

time: int. Epoch time of the article’s published time.

providerCode: String. News provider code based on requested data.

articleId: String. Identifier used to track the particular article. See [News Article](/tws-api/doc/news/news-articles/introduction) for more.

headline: String. Headline of the provided news article.
)

Returns news headlines for requested contracts.

1def historicalNews(self, requestId: int, time: int, providerCode: str, articleId: str, headline: str):
2 print("historicalNews. RequestId:", requestId, "Time:", time, "ProviderCode:", providerCode, "ArticleId:", articleId, "Headline:", headline)

EWrapper.historicalNewsEnd (

requestId: int. Request identifier used to track data.

hasMore: bool. Returns whether there is more data (true) or not (false).
)

Returns news headlines end marker

1def historicalDataEnd(self, reqId: int, hasMore: bool):
2 print("historicalDataEnd. ReqId:", reqId, "Has More:", hasMore)