_notify_sell needs ordertype seperately

This commit is contained in:
Matthias 2019-09-01 09:17:58 +02:00
parent 292df115e8
commit 7c0a49a6f9
1 changed files with 4 additions and 4 deletions

View File

@ -688,7 +688,7 @@ class FreqtradeBot(object):
# Lock pair for one candle to prevent immediate rebuys # Lock pair for one candle to prevent immediate rebuys
self.strategy.lock_pair(trade.pair, self.strategy.lock_pair(trade.pair,
timeframe_to_next_date(self.config['ticker_interval'])) timeframe_to_next_date(self.config['ticker_interval']))
self._notify_sell(trade) self._notify_sell(trade, "stoploss")
return True return True
# Finally we check if stoploss on exchange should be moved up because of trailing. # Finally we check if stoploss on exchange should be moved up because of trailing.
@ -904,9 +904,9 @@ class FreqtradeBot(object):
# Lock pair for one candle to prevent immediate rebuys # Lock pair for one candle to prevent immediate rebuys
self.strategy.lock_pair(trade.pair, timeframe_to_next_date(self.config['ticker_interval'])) self.strategy.lock_pair(trade.pair, timeframe_to_next_date(self.config['ticker_interval']))
self._notify_sell(trade) self._notify_sell(trade, ordertype)
def _notify_sell(self, trade: Trade): def _notify_sell(self, trade: Trade, order_type: str):
""" """
Sends rpc notification when a sell occured. Sends rpc notification when a sell occured.
""" """
@ -923,7 +923,7 @@ class FreqtradeBot(object):
'pair': trade.pair, 'pair': trade.pair,
'gain': gain, 'gain': gain,
'limit': trade.close_rate_requested, 'limit': trade.close_rate_requested,
'order_type': self.strategy.order_types['sell'], 'order_type': order_type,
'amount': trade.amount, 'amount': trade.amount,
'open_rate': trade.open_rate, 'open_rate': trade.open_rate,
'current_rate': current_rate, 'current_rate': current_rate,