Wire the trading bot to real Alpaca market data and persist pipeline state to the database so the dashboard displays live information. - Add market-data service fetching OHLCV bars from Alpaca, publishing to market:bars Redis Stream; signal generator consumes bars and injects current_price into signals for position sizing - Sentiment analyzer now persists Article + ArticleSentiment rows to DB after scoring, with duplicate and error handling - API gateway runs a background portfolio sync task that snapshots Alpaca account state into PortfolioSnapshot/Position DB tables during market hours - TradeSignal carries a signal_id UUID; signal generator and trade executor both persist their records to DB with cross-references - 303 unit tests pass (57 new tests added)
16 lines
467 B
Python
16 lines
467 B
Python
"""Configuration for the market data service."""
|
|
|
|
from shared.config import BaseConfig
|
|
|
|
|
|
class MarketDataConfig(BaseConfig):
|
|
"""Extends BaseConfig with market-data-specific settings."""
|
|
|
|
watchlist: list[str] = ["AAPL", "TSLA", "NVDA", "MSFT", "GOOGL"]
|
|
bar_timeframe: str = "5Min"
|
|
poll_interval_seconds: int = 60
|
|
historical_bars: int = 100
|
|
alpaca_api_key: str = ""
|
|
alpaca_secret_key: str = ""
|
|
|
|
model_config = {"env_prefix": "TRADING_"}
|