Skip to content

Commit

Permalink
Merge pull request freqtrade#5605 from peterwilli/fix-sell-cancel-web…
Browse files Browse the repository at this point in the history
…hook-error

fixed webhook "unsupported format string passed to NoneType." error
  • Loading branch information
xmatthias authored Sep 23, 2021
2 parents ff9c8fe + 692e91a commit 9a6d897
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions freqtrade/freqtradebot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ def _notify_exit_cancel(self, trade: Trade, order_type: str, reason: str) -> Non
'exchange': trade.exchange.capitalize(),
'pair': trade.pair,
'gain': gain,
'limit': profit_rate,
'limit': profit_rate or 0,
'order_type': order_type,
'amount': trade.amount,
'open_rate': trade.open_rate,
Expand All @@ -1226,7 +1226,7 @@ def _notify_exit_cancel(self, trade: Trade, order_type: str, reason: str) -> Non
'profit_ratio': profit_ratio,
'sell_reason': trade.sell_reason,
'open_date': trade.open_date,
'close_date': trade.close_date,
'close_date': trade.close_date or datetime.now(timezone.utc),
'stake_currency': self.config['stake_currency'],
'fiat_currency': self.config.get('fiat_display_currency', None),
'reason': reason,
Expand Down

0 comments on commit 9a6d897

Please sign in to comment.