trader.news.search module¶
Search by phrase, returning the symbols the news is talking about.
NewsProvider goes symbol -> news. This goes the other way, which is what discovery needs: given “nuclear energy”, which tickers are in the story?
Two sources inside one response, and both matter. quotes are symbols whose name or description matches the phrase. news[].relatedTickers are symbols Yahoo tagged onto an article — noisier (an article about a small nuclear company came back tagged NVDA and BAC on 2026-08-03) but the only way a symbol that does not contain the phrase in its name is ever surfaced.
- class trader.news.search.NewsSearchProvider(*args, **kwargs)[source]¶
Bases:
ProtocolSymbols mentioned in news matching a phrase.
- class trader.news.search.SearchHit(symbol, theme, origin, headline=None, url=None)[source]¶
Bases:
objectOne symbol a phrase surfaced, and why.
- Parameters:
symbol (str)
theme (str)
origin (str)
headline (str | None)
url (str | None)
- symbol: str¶
- theme: str¶
- origin: str¶
- headline: str | None¶
- url: str | None¶