diff --git a/src/arbus.py b/src/arbus.py index fd9db6c..5003608 100644 --- a/src/arbus.py +++ b/src/arbus.py @@ -25,7 +25,7 @@ def getPnL(pair): strategyStartTime = None for timestamp, message in logEntries: - if message == f"Starting strategy with {pair}": + if message == (f"Starting strategy with {pair}"): strategyStartTime = timestamp if not strategyStartTime: diff --git a/src/bybit.py b/src/bybit.py index 18d5f2b..0fe4c88 100644 --- a/src/bybit.py +++ b/src/bybit.py @@ -210,11 +210,13 @@ class tradingData: j['long'] = False j['longIDs'] = ['-1', '-1', '-1'] generalLogger.info(f"Long order on {self.pair} level {j['price']} triggered TP/SL") + tradingLogger.info(f"Long order on {self.pair} level {j['price']} triggered TP/SL") self.orderCounter -= 1 if orderID in shortIDs: j['short'] = False j['shortIDs'] = ['-1', '-1', '-1'] generalLogger.info(f"Short order on {self.pair} level {j['price']} triggered TP/SL") + tradingLogger.info(f"Short order on {self.pair} level {j['price']} triggered TP/SL") self.orderCounter -= 1 if orderStatus == 'Filled': for j in self.levels: @@ -224,6 +226,7 @@ class tradingData: generalLogger.info(f"Long order on {self.pair} level {j['price']} filled with P&L {i['closedPnl']} and qty {i['qty']}") tradingLogger.info(f"Long order on {self.pair} level {j['price']} filled with P&L {i['closedPnl']} and qty {i['qty']}") if orderID in shortIDs: + generalLogger.info(f"Short order on {self.pair} level {j['price']} filled with P&L {i['closedPnl']} and qty {i['qty']}") tradingLogger.info(f"Short order on {self.pair} level {j['price']} filled with P&L {i['closedPnl']} and qty {i['qty']}") @@ -247,6 +250,7 @@ async def getClient(apiKey, apiSecret, testnet, demoTrading): async def strategy(pair: str, params): generalLogger.info('Starting strategy with ' + pair) + tradingLogger.info('Starting strategy with ' + pair) paramsDict = await jsonProcessing.parseParams(params)