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:
@@ -57,16 +57,12 @@ SYMBOL_DISPLAY = {
|
||||
"EURJPY=X": "EUR/JPY", "GBPJPY=X": "GBP/JPY",
|
||||
"AUDJPY=X": "AUD/JPY", "EURCHF=X": "EUR/CHF",
|
||||
"CADJPY=X": "CAD/JPY",
|
||||
# Commodities
|
||||
"XAUUSD=X": "XAU/USD", "XAGUSD=X": "XAG/USD",
|
||||
}
|
||||
|
||||
# Pip values per symbol (used for trade setup risk/reward in pips)
|
||||
# Commodities and JPY pairs differ from the standard 0.0001 forex pip
|
||||
PIP_VALUES = {
|
||||
"XAUUSD=X": 0.01, # Gold: 1 pip = $0.01
|
||||
"XAGUSD=X": 0.001, # Silver: 1 pip = $0.001
|
||||
}
|
||||
# Forex defaults: 0.01 for JPY pairs, 0.0001 for everything else.
|
||||
# Override here for any pair that doesn't follow that rule.
|
||||
PIP_VALUES: Dict[str, float] = {}
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
Reference in New Issue
Block a user