Introduce InsufficientFundsError exception

This commit is contained in:
Matthias
2020-08-14 09:57:13 +02:00
parent a6fc922f28
commit 22af82631a
4 changed files with 8 additions and 6 deletions

View File

@@ -5,6 +5,7 @@ from typing import Dict
import ccxt
from freqtrade.exceptions import (DDosProtection, ExchangeError,
InsufficientFundsError,
InvalidOrderException, OperationalException,
TemporaryError)
from freqtrade.exchange import Exchange
@@ -61,7 +62,7 @@ class Ftx(Exchange):
'stop price: %s.', pair, stop_price)
return order
except ccxt.InsufficientFunds as e:
raise ExchangeError(
raise InsufficientFundsError(
f'Insufficient funds to create {ordertype} sell order on market {pair}. '
f'Tried to create stoploss with amount {amount} at stoploss {stop_price}. '
f'Message: {e}') from e