Info and log fixes
All checks were successful
Build and Push Docker Image / build-and-push (release) Successful in 1m16s
All checks were successful
Build and Push Docker Image / build-and-push (release) Successful in 1m16s
This commit is contained in:
@ -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:
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user