aboutsummaryrefslogtreecommitdiff
path: root/portfolio.py
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-04-09 11:52:45 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2018-04-09 11:52:45 +0200
commit18de421e455ab4b125a6684d703a296562097e6b (patch)
tree1e68454391f91136cfd53360e916d1047c413abb /portfolio.py
parentc5a3b4e8c00f8d7bb54b342b1dd43c08bbfbd4db (diff)
downloadTrader-18de421e455ab4b125a6684d703a296562097e6b.tar.gz
Trader-18de421e455ab4b125a6684d703a296562097e6b.tar.zst
Trader-18de421e455ab4b125a6684d703a296562097e6b.zip
Fix ccxt switching currency codes
Diffstat (limited to 'portfolio.py')
-rw-r--r--portfolio.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/portfolio.py b/portfolio.py
index 146ee79..1067b0b 100644
--- a/portfolio.py
+++ b/portfolio.py
@@ -311,6 +311,10 @@ class Trade:
311 if self.action is None: 311 if self.action is None:
312 return None 312 return None
313 ticker = self.market.get_ticker(self.currency, self.base_currency) 313 ticker = self.market.get_ticker(self.currency, self.base_currency)
314 if ticker is None:
315 self.market.report.log_error("prepare_order",
316 message="Unknown ticker {}/{}".format(self.currency, self.base_currency))
317 return None
314 self.inverted = ticker["inverted"] 318 self.inverted = ticker["inverted"]
315 if self.inverted: 319 if self.inverted:
316 ticker = ticker["original"] 320 ticker = ticker["original"]