Remove yfinance/XAU/XAG fallback — focus on currency pairs only
- data_provider: strip yfinance imports, _YF_FALLBACK_MAP, _YF_INTERVALS, _YF_SESSION, _fetch_yfinance_fallback, _resample_h1_to_h4. Twelve Data is the sole data source. Raises DataUnavailableError if a pair isn't on the configured plan. - config: remove XAU/USD and XAG/USD from SYMBOL_DISPLAY and PIP_VALUES. PIP_VALUES is now empty (defaults: 0.01 JPY pairs, 0.0001 forex). - signal_aggregator: clear _PER_SYMBOL_TFS overrides (was XAU/XAG-only). - telegram_bot: replace XAUUSD with AUDUSD in SCAN_PAIRS. Auto-load .env via python-dotenv so TELEGRAM_BOT_TOKEN/GEMINI_API_KEY are picked up. - requirements: drop yfinance and curl_cffi dependencies. End-to-end pipeline test passes: data freshness, news engine (Gemini live), signal aggregator, and the /signal+/scan code paths in telegram_bot. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -31,14 +31,10 @@ from news_engine import NewsEngine, FundamentalContext
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# Per-symbol full TF list (primary + confirmations). Overrides the global
|
||||
# config.confirmation_timeframes for these symbols only — forex pairs are
|
||||
# unaffected. XAU/XAG use M15+H1+H4 (no D1 since yfinance daily for futures
|
||||
# is unreliable; H4 is resampled from H1 in data_provider).
|
||||
_PER_SYMBOL_TFS: Dict[str, List[Timeframe]] = {
|
||||
"XAUUSD=X": [Timeframe.M15, Timeframe.H1, Timeframe.H4],
|
||||
"XAGUSD=X": [Timeframe.M15, Timeframe.H1, Timeframe.H4],
|
||||
}
|
||||
# Per-symbol TF overrides. Currently empty — all forex pairs use the global
|
||||
# config.confirmation_timeframes. Add entries here only if a specific symbol
|
||||
# needs a different MTF set.
|
||||
_PER_SYMBOL_TFS: Dict[str, List[Timeframe]] = {}
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
Reference in New Issue
Block a user