From a6fc922f2830481c1d4b18b40a79acf9204c2b85 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 14 Aug 2020 09:56:48 +0200 Subject: [PATCH] Introduce insufficientFunds Exception --- docs/developer.md | 2 ++ freqtrade/exceptions.py | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/docs/developer.md b/docs/developer.md index f09ae2c76..b79930061 100644 --- a/docs/developer.md +++ b/docs/developer.md @@ -110,6 +110,8 @@ Below is an outline of exception inheritance hierarchy: | +---+ InvalidOrderException | | | +---+ RetryableOrderError +| | +| +---+ InsufficientFundsError | +---+ StrategyError ``` diff --git a/freqtrade/exceptions.py b/freqtrade/exceptions.py index e2bc969a9..caf970606 100644 --- a/freqtrade/exceptions.py +++ b/freqtrade/exceptions.py @@ -51,6 +51,13 @@ class RetryableOrderError(InvalidOrderException): """ +class InsufficientFundsError(InvalidOrderException): + """ + This error is used when there are not enough funds available on the exchange + to create an order. + """ + + class TemporaryError(ExchangeError): """ Temporary network or exchange related error.