From a47a25ca8889667bfec6cd948a2773b471cff87a Mon Sep 17 00:00:00 2001 From: hroff-1902 Date: Thu, 2 Jan 2020 14:38:25 +0300 Subject: [PATCH] Refine passing msg params --- freqtrade/freqtradebot.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index 5e6ffbfde..c18d9131f 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -498,16 +498,10 @@ class FreqtradeBot: 'limit': trade.open_rate, 'order_type': order_type, 'stake_amount': trade.stake_amount, + 'stake_currency': self.config['stake_currency'], + 'fiat_currency': self.config.get('fiat_display_currency', None), } - if 'stake_currency' in self.config and 'fiat_display_currency' in self.config: - stake_currency = self.config['stake_currency'] - fiat_currency = self.config['fiat_display_currency'] - msg.update({ - 'stake_currency': stake_currency, - 'fiat_currency': fiat_currency, - }) - # Send the message self.rpc.send_msg(msg) @@ -966,13 +960,12 @@ class FreqtradeBot: 'sell_reason': trade.sell_reason, 'open_date': trade.open_date, 'close_date': trade.close_date or datetime.utcnow(), + 'stake_currency': self.config['stake_currency'], } - if 'stake_currency' in self.config and 'fiat_display_currency' in self.config: - stake_currency = self.config['stake_currency'] + if 'fiat_display_currency' in self.config: fiat_currency = self.config['fiat_display_currency'] msg.update({ - 'stake_currency': stake_currency, 'fiat_currency': fiat_currency, })