diff options
Diffstat (limited to 'portfolio.py')
-rw-r--r-- | portfolio.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/portfolio.py b/portfolio.py index 43a39c4..0797de0 100644 --- a/portfolio.py +++ b/portfolio.py | |||
@@ -3,7 +3,7 @@ from datetime import datetime, timedelta | |||
3 | from decimal import Decimal as D, ROUND_DOWN | 3 | from decimal import Decimal as D, ROUND_DOWN |
4 | from json import JSONDecodeError | 4 | from json import JSONDecodeError |
5 | from simplejson.errors import JSONDecodeError as SimpleJSONDecodeError | 5 | from simplejson.errors import JSONDecodeError as SimpleJSONDecodeError |
6 | from ccxt import ExchangeError, ExchangeNotAvailable | 6 | from ccxt import ExchangeError, ExchangeNotAvailable, InvalidOrder |
7 | import requests | 7 | import requests |
8 | 8 | ||
9 | # FIXME: correctly handle web call timeouts | 9 | # FIXME: correctly handle web call timeouts |
@@ -532,7 +532,7 @@ class Order: | |||
532 | else: | 532 | else: |
533 | try: | 533 | try: |
534 | self.results.append(self.market.ccxt.create_order(symbol, 'limit', self.action, amount, price=self.rate, account=self.account)) | 534 | self.results.append(self.market.ccxt.create_order(symbol, 'limit', self.action, amount, price=self.rate, account=self.account)) |
535 | except ExchangeNotAvailable: | 535 | except (ExchangeNotAvailable, InvalidOrder): |
536 | # Impossible to honor the order (dust amount) | 536 | # Impossible to honor the order (dust amount) |
537 | self.status = "closed" | 537 | self.status = "closed" |
538 | self.mark_finished_order() | 538 | self.mark_finished_order() |