feat: news fetcher service — RSS and Reddit sources
This commit is contained in:
parent
9f46071502
commit
90b52a5144
10 changed files with 722 additions and 2 deletions
28
services/news_fetcher/config.py
Normal file
28
services/news_fetcher/config.py
Normal 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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue