diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index c6101cbbe..5a8513f12 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -1271,7 +1271,7 @@ class FreqtradeBot(LoggingMixin): 'order_type': order_type, 'amount': amount, 'open_rate': open_rate, - 'close_rate': trade.close_rate, + 'close_rate': profit_rate, 'current_rate': current_rate, 'profit_amount': profit, 'profit_ratio': profit_ratio, diff --git a/freqtrade/rpc/telegram.py b/freqtrade/rpc/telegram.py index 4aa401bb3..c6e0591fa 100644 --- a/freqtrade/rpc/telegram.py +++ b/freqtrade/rpc/telegram.py @@ -537,6 +537,7 @@ class Telegram(RPCHandler): :return: None """ try: + if update.callback_query:show_order = '1' in update.callback_query.data fiat_currency = self._config.get('fiat_display_currency', '') statlist, head, fiat_profit_sum = self._rpc._rpc_status_table( self._config['stake_currency'], fiat_currency, show_order) @@ -563,11 +564,11 @@ class Telegram(RPCHandler): lines = message.split("\n") message = "\n".join(lines[:-1] + [lines[1]] + [lines[-1]]) self._send_msg(f"
{message}", parse_mode=ParseMode.HTML, - reload_able=True, callback_path="update_status_table", + reload_able=True, callback_path=f"update_status_table {bool(show_order)}", query=update.callback_query) except RPCException as e: self._send_msg(str(e), reload_able=True, - callback_path="update_status_table", + callback_path=f"update_status_table {bool(show_order)}", query=update.callback_query) @authorized_only