diff --git a/agents/xau_brief.py b/agents/xau_brief.py index 1dbd33b..b285676 100644 --- a/agents/xau_brief.py +++ b/agents/xau_brief.py @@ -45,8 +45,8 @@ class XAUBriefAgent: def _get_gold_fallback(self): """Fallback: dados da Binance via par alternativo (GOLD/USDT).""" result = {} - # Tenta XAU/BRL ou XAU/USDT na Binance - symbols = ["XAUUSDT", "GLDUSDT", "PAXGUSDT"] + # Tenta XAUTUSDT (Tether Gold - lastreado em ouro físico) na Binance + symbols = ["XAUTUSDT", "XAUTBTC", "GLDUSDT", "PAXGUSDT"] for sym in symbols: try: r = requests.get( @@ -60,13 +60,13 @@ class XAUBriefAgent: result["high"] = float(data.get("highPrice", 0)) result["low"] = float(data.get("lowPrice", 0)) result["volume"] = float(data.get("quoteVolume", 0)) - if result["xau_usd"] > 100: # preço válido de ouro + if result["xau_usd"] > 1000: # ouro está ~US$ 2000+ break except: continue - # Segundo fallback: exchangerate - if not result.get("xau_usd") or result["xau_usd"] < 100: + # Segundo fallback: exchangerate (XAU não está lá mas tenta) + if not result.get("xau_usd") or result["xau_usd"] < 1000: try: r = requests.get( "https://api.exchangerate-api.com/v4/latest/XAU",