Introduce ExchangeError

This commit is contained in:
Matthias
2020-06-28 16:01:40 +02:00
parent e74d2af857
commit bf61bc9d83
8 changed files with 34 additions and 26 deletions

View File

@@ -4,7 +4,7 @@ from typing import Dict
import ccxt
from freqtrade.exceptions import (DDosProtection, DependencyException,
from freqtrade.exceptions import (DDosProtection, ExchangeError,
InvalidOrderException, OperationalException,
TemporaryError)
from freqtrade.exchange import Exchange
@@ -61,7 +61,7 @@ class Ftx(Exchange):
'stop price: %s.', pair, stop_price)
return order
except ccxt.InsufficientFunds as e:
raise DependencyException(
raise ExchangeError(
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