From 20b2f2506790036f4fb5c0695b44f2a446053ce2 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 6 Jan 2024 13:11:45 +0100 Subject: [PATCH] Add quote currency to entry/exit msgs --- freqtrade/freqtradebot.py | 4 ++++ freqtrade/rpc/rpc_types.py | 1 + 2 files changed, 5 insertions(+) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index 8709e1b4d..40163feba 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -1022,6 +1022,7 @@ class FreqtradeBot(LoggingMixin): 'stake_amount': trade.stake_amount, 'stake_currency': self.config['stake_currency'], 'base_currency': self.exchange.get_pair_base_currency(trade.pair), + 'quote_currency': self.exchange.get_pair_quote_currency(trade.pair), 'fiat_currency': self.config.get('fiat_display_currency', None), 'amount': order.safe_amount_after_fee if fill else (order.amount or trade.amount), 'open_date': trade.open_date_utc or datetime.now(timezone.utc), @@ -1055,6 +1056,7 @@ class FreqtradeBot(LoggingMixin): 'open_rate': trade.open_rate, 'stake_currency': self.config['stake_currency'], 'base_currency': self.exchange.get_pair_base_currency(trade.pair), + 'quote_currency': self.exchange.get_pair_quote_currency(trade.pair), 'fiat_currency': self.config.get('fiat_display_currency', None), 'amount': trade.amount, 'open_date': trade.open_date, @@ -1814,6 +1816,7 @@ class FreqtradeBot(LoggingMixin): 'stake_amount': trade.stake_amount, 'stake_currency': self.config['stake_currency'], 'base_currency': self.exchange.get_pair_base_currency(trade.pair), + 'quote_currency': self.exchange.get_pair_quote_currency(trade.pair), 'fiat_currency': self.config.get('fiat_display_currency'), 'sub_trade': sub_trade, 'cumulative_profit': trade.realized_profit, @@ -1865,6 +1868,7 @@ class FreqtradeBot(LoggingMixin): 'close_date': trade.close_date or datetime.now(timezone.utc), 'stake_currency': self.config['stake_currency'], 'base_currency': self.exchange.get_pair_base_currency(trade.pair), + 'quote_currency': self.exchange.get_pair_quote_currency(trade.pair), 'fiat_currency': self.config.get('fiat_display_currency', None), 'reason': reason, 'sub_trade': sub_trade, diff --git a/freqtrade/rpc/rpc_types.py b/freqtrade/rpc/rpc_types.py index d69c39764..0d58e96c2 100644 --- a/freqtrade/rpc/rpc_types.py +++ b/freqtrade/rpc/rpc_types.py @@ -51,6 +51,7 @@ class __RPCEntryExitMsgBase(RPCSendMsgBase): exchange: str pair: str base_currency: str + quote_currency: str leverage: Optional[float] direction: str limit: float