From 551831f8c6ad33cea4a0ffb09998f7be7cc30e84 Mon Sep 17 00:00:00 2001 From: anor Date: Mon, 9 Mar 2026 19:33:17 +1000 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=B4=D0=B8=D0=BD=D0=B0=D0=BC=D0=B8?= =?UTF-8?q?=D1=87=D0=B5=D1=81=D0=BA=D0=B8=D0=B9=20=D1=81=D0=BF=D0=B8=D1=81?= =?UTF-8?q?=D0=BE=D0=BA=20=D0=BC=D0=BE=D0=BD=D0=B5=D1=82=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20=D0=B1=D0=B0=D0=BB=D0=B0=D0=BD=D1=81=D0=B0=20=D0=B8?= =?UTF-8?q?=D0=B7=20=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Хардкоженный список не включал DOGE/ADA/DOT → баланс занижался на ~$6 (не считал DOGE позицию). Co-Authored-By: Claude Opus 4.6 --- src/remizov_trader/cli.py | 6 +++++- src/remizov_trader/notify.py | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/remizov_trader/cli.py b/src/remizov_trader/cli.py index 14b8c1c..86cca1b 100644 --- a/src/remizov_trader/cli.py +++ b/src/remizov_trader/cli.py @@ -307,7 +307,11 @@ def _send_balance(cfg): # Collect balances and convert to USDC total_usdc = 0.0 coin_lines = [] - for coin in ["USDC", "USDT", "BTC", "ETH", "SOL", "AVAX", "LINK", "XRP"]: + # Build coin list from configured assets + stablecoins + coins = {"USDC", "USDT"} + for a in cfg.assets: + coins.add(a.symbol.split("/")[0]) + for coin in sorted(coins): free = float(b.get(coin, {}).get("free", 0) or 0) total = float(b.get(coin, {}).get("total", 0) or 0) if total < 0.0001: diff --git a/src/remizov_trader/notify.py b/src/remizov_trader/notify.py index 67ceaa3..08f1f16 100644 --- a/src/remizov_trader/notify.py +++ b/src/remizov_trader/notify.py @@ -56,7 +56,11 @@ def _get_exchange_balance(cfg) -> float | None: spot._ensure_markets() b = spot.exchange.fetch_balance() total = 0.0 - for coin in ["USDC", "USDT", "BTC", "ETH", "SOL", "AVAX", "LINK", "XRP"]: + # Build coin list from configured assets + stablecoins + coins = {"USDC", "USDT"} + for a in cfg.assets: + coins.add(a.symbol.split("/")[0]) + for coin in sorted(coins): amt = float(b.get(coin, {}).get("total", 0) or 0) if amt < 0.0001: continue