feat: news fetcher service — RSS and Reddit sources

This commit is contained in:
Viktor Barzin 2026-02-22 15:25:27 +00:00
parent 9f46071502
commit 90b52a5144
No known key found for this signature in database
GPG key ID: 0EB088298288D958
10 changed files with 722 additions and 2 deletions

View file

@ -0,0 +1,28 @@
"""Configuration for the news fetcher service."""
from shared.config import BaseConfig
class NewsFetcherConfig(BaseConfig):
"""News fetcher settings.
Extends :class:`BaseConfig` with RSS feed URLs, poll intervals,
and Reddit API credentials. All settings can be overridden via
environment variables prefixed with ``TRADING_``.
"""
# RSS settings
rss_feeds: list[str] = [
"https://finance.yahoo.com/news/rssindex",
"https://feeds.reuters.com/reuters/businessNews",
"https://feeds.content.dowjones.io/public/rss/mw_topstories",
]
rss_poll_interval_seconds: int = 300
# Reddit settings
reddit_subreddits: list[str] = ["wallstreetbets", "stocks", "investing"]
reddit_poll_interval_seconds: int = 600
reddit_min_score: int = 10
reddit_client_id: str = ""
reddit_client_secret: str = ""
reddit_user_agent: str = "trading-bot/0.1"