X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=portfolio.py;h=1067b0b0e50084283efe3c7d61477312ae9336d8;hb=17fd3f752d5e37df906abddf1f13fd7ad1de6c00;hp=146ee79b29611da8b58c8bfc9cf2c83663fd7712;hpb=e7d7c0e5645da35adcbfec9e51deb68f012c422f;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FCryptoportfolio%2FTrader.git diff --git a/portfolio.py b/portfolio.py index 146ee79..1067b0b 100644 --- a/portfolio.py +++ b/portfolio.py @@ -311,6 +311,10 @@ class Trade: if self.action is None: return None ticker = self.market.get_ticker(self.currency, self.base_currency) + if ticker is None: + self.market.report.log_error("prepare_order", + message="Unknown ticker {}/{}".format(self.currency, self.base_currency)) + return None self.inverted = ticker["inverted"] if self.inverted: ticker = ticker["original"]