Fixed some bugs for live sell_tags.

This commit is contained in:
theluxaz 2021-10-14 01:03:15 +03:00
parent 7067c43ff4
commit 96cab22a8c
2 changed files with 8 additions and 2 deletions

View File

@ -1187,6 +1187,7 @@ class FreqtradeBot(LoggingMixin):
'profit_amount': profit_trade, 'profit_amount': profit_trade,
'profit_ratio': profit_ratio, 'profit_ratio': profit_ratio,
'sell_reason': trade.sell_reason, 'sell_reason': trade.sell_reason,
'sell_tag': trade.sell_tag,
'open_date': trade.open_date, 'open_date': trade.open_date,
'close_date': trade.close_date or datetime.utcnow(), 'close_date': trade.close_date or datetime.utcnow(),
'stake_currency': self.config['stake_currency'], 'stake_currency': self.config['stake_currency'],
@ -1230,6 +1231,7 @@ class FreqtradeBot(LoggingMixin):
'profit_amount': profit_trade, 'profit_amount': profit_trade,
'profit_ratio': profit_ratio, 'profit_ratio': profit_ratio,
'sell_reason': trade.sell_reason, 'sell_reason': trade.sell_reason,
'sell_tag': trade.sell_tag,
'open_date': trade.open_date, 'open_date': trade.open_date,
'close_date': trade.close_date or datetime.now(timezone.utc), 'close_date': trade.close_date or datetime.now(timezone.utc),
'stake_currency': self.config['stake_currency'], 'stake_currency': self.config['stake_currency'],

View File

@ -265,7 +265,11 @@ class Telegram(RPCHandler):
"*Current Rate:* `{current_rate:.8f}`\n" "*Current Rate:* `{current_rate:.8f}`\n"
"*Close Rate:* `{limit:.8f}`").format(**msg) "*Close Rate:* `{limit:.8f}`").format(**msg)
sell_tag =None
if("sell_tag" in msg.keys()):
sell_tag = msg['sell_tag'] sell_tag = msg['sell_tag']
buy_tag =None
if("buy_tag" in msg.keys()):
buy_tag = msg['buy_tag'] buy_tag = msg['buy_tag']
if sell_tag is not None and buy_tag is not None: if sell_tag is not None and buy_tag is not None: