From 738752d50daa13edb154934268c813cadd9965c8 Mon Sep 17 00:00:00 2001 From: Kavinkumar <33546454+mkavinkumar1@users.noreply.github.com> Date: Thu, 10 Mar 2022 12:28:25 +0530 Subject: [PATCH] Update freqtradebot.py --- freqtrade/freqtradebot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index d91255807..61dd78615 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -1297,7 +1297,6 @@ class FreqtradeBot(LoggingMixin): 'current_rate': current_rate, 'profit_amount': profit, 'profit_ratio': profit_ratio, - 'cumulative_profit': trade.realized_profit, 'buy_tag': trade.buy_tag, 'sell_reason': trade.sell_reason, 'open_date': trade.open_date, @@ -1307,6 +1306,8 @@ class FreqtradeBot(LoggingMixin): 'fiat_currency': self.config.get('fiat_display_currency', None), 'sub_trade': sub_trade, } + if sub_trade: + msg['cumulative_profit'] = trade.realized_profit, # Send the message self.rpc.send_msg(msg)