From b5cc51a4d2b9ce4d37b5dc40d36a84c87bd57132 Mon Sep 17 00:00:00 2001 From: Gemini CLI Date: Thu, 5 Mar 2026 22:15:01 +0100 Subject: [PATCH] fix: use BTC for DB queries and BTCUSDT for Bybit API (v1.3.1) --- src/strategies/ping_pong_bot.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/strategies/ping_pong_bot.py b/src/strategies/ping_pong_bot.py index 6212233..90ec4e5 100644 --- a/src/strategies/ping_pong_bot.py +++ b/src/strategies/ping_pong_bot.py @@ -68,7 +68,7 @@ class DatabaseManager: class PingPongBot: def __init__(self, config_path="config/ping_pong_config.yaml"): - self.version = "1.3.0" + self.version = "1.3.1" with open(config_path, 'r') as f: self.config = yaml.safe_load(f) @@ -86,7 +86,8 @@ class PingPongBot: self.db = DatabaseManager() - self.symbol = self.config['symbol'] + self.symbol = self.config['symbol'].upper() # e.g. BTCUSDT + self.db_symbol = self.symbol.replace("USDT", "") # e.g. BTC self.interval = str(self.config['interval']) self.direction = self.config['direction'].lower() @@ -256,7 +257,7 @@ class PingPongBot: last_exchange_update = now # 2. DB Sync (5s) - candles = await self.db.get_candles(self.symbol, self.interval, limit=100) + candles = await self.db.get_candles(self.db_symbol, self.interval, limit=100) if candles: latest = candles[0] if latest['time'] != self.last_candle_time: