Replace XAU/USD with USD/CAD — TwelveData has no gold data

XAU/USD is not available in TwelveData's symbol list.
Swapped to USD/CAD across config, scan pairs, Telegram buttons,
and added CAD to tracked news currencies.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
harwinder
2026-05-11 15:50:48 -04:00
parent b3e0da7455
commit a15dc40050
2 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -39,13 +39,13 @@ class MarketSession(Enum):
USDJPY = "USDJPY=X"
EURUSD = "EURUSD=X"
GBPUSD = "GBPUSD=X"
XAUUSD = "XAUUSD=X"
USDCAD = "USDCAD=X"
PAIR_INFO = {
USDJPY: {"display": "USD/JPY", "pip_value": 0.01, "is_jpy_pair": True},
EURUSD: {"display": "EUR/USD", "pip_value": 0.0001, "is_jpy_pair": False},
GBPUSD: {"display": "GBP/USD", "pip_value": 0.0001, "is_jpy_pair": False},
XAUUSD: {"display": "XAU/USD", "pip_value": 0.10, "is_jpy_pair": False},
USDCAD: {"display": "USD/CAD", "pip_value": 0.0001, "is_jpy_pair": False},
}
# Defaults (kept for backward compat)
@@ -121,7 +121,7 @@ class SignalConfig:
@dataclass
class NewsConfig:
"""Economic calendar & sentiment."""
tracked_currencies: List[str] = field(default_factory=lambda: ["USD", "JPY", "EUR", "GBP"])
tracked_currencies: List[str] = field(default_factory=lambda: ["USD", "JPY", "EUR", "GBP", "CAD"])
min_impact: str = "medium"
pre_event_buffer_minutes: int = 30
post_event_buffer_minutes: int = 15
@@ -168,7 +168,7 @@ class PlatformConfig:
refresh_interval: int = 300
scan_pairs: List[str] = field(
default_factory=lambda: [EURUSD, USDJPY, GBPUSD, XAUUSD]
default_factory=lambda: [EURUSD, USDJPY, GBPUSD, USDCAD]
)
scan_timeframes: List[Timeframe] = field(
default_factory=lambda: [Timeframe.M15, Timeframe.H1]