]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Trader.git/commitdiff
Actually close closed dust remaining at the end
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Tue, 1 May 2018 14:13:46 +0000 (16:13 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Tue, 1 May 2018 14:13:46 +0000 (16:13 +0200)
portfolio.py

index c064249af992bcd46a9f5e41f47cd3c1c5fff724..d8a546584afc4549be442e1593030ec82c5f0eef 100644 (file)
@@ -616,7 +616,7 @@ class Order:
             self.market.report.log_debug_action("Mark {} as cancelled".format(self))
             self.status = "canceled"
             return
-        if self.open and self.id is not None:
+        if (self.status == "closed_dust_remaining" or self.open) and self.id is not None:
             try:
                 self.market.ccxt.cancel_order(self.id)
             except OrderNotFound as e: # Closed inbetween