diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index f8b9dbb5e..d415c9d93 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -1187,6 +1187,7 @@ class FreqtradeBot(LoggingMixin): 'profit_amount': profit_trade, 'profit_ratio': profit_ratio, 'sell_reason': trade.sell_reason, + 'sell_tag': trade.sell_tag, 'open_date': trade.open_date, 'close_date': trade.close_date or datetime.utcnow(), 'stake_currency': self.config['stake_currency'], @@ -1230,6 +1231,7 @@ class FreqtradeBot(LoggingMixin): 'profit_amount': profit_trade, 'profit_ratio': profit_ratio, 'sell_reason': trade.sell_reason, + 'sell_tag': trade.sell_tag, 'open_date': trade.open_date, 'close_date': trade.close_date or datetime.now(timezone.utc), 'stake_currency': self.config['stake_currency'], diff --git a/freqtrade/rpc/telegram.py b/freqtrade/rpc/telegram.py index bd8c83315..db745ff37 100644 --- a/freqtrade/rpc/telegram.py +++ b/freqtrade/rpc/telegram.py @@ -265,8 +265,12 @@ class Telegram(RPCHandler): "*Current Rate:* `{current_rate:.8f}`\n" "*Close Rate:* `{limit:.8f}`").format(**msg) - sell_tag = msg['sell_tag'] - buy_tag = msg['buy_tag'] + sell_tag =None + if("sell_tag" in msg.keys()): + sell_tag = msg['sell_tag'] + buy_tag =None + if("buy_tag" in msg.keys()): + buy_tag = msg['buy_tag'] if sell_tag is not None and buy_tag is not None: message = ("{emoji} *{exchange}:* Selling {pair} (#{trade_id})\n"