diff options
Diffstat (limited to 'portfolio.py')
-rw-r--r-- | portfolio.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/portfolio.py b/portfolio.py index cb14c5d..9f82d88 100644 --- a/portfolio.py +++ b/portfolio.py | |||
@@ -1,4 +1,4 @@ | |||
1 | import ccxt | 1 | from ccxt import ExchangeError |
2 | import time | 2 | import time |
3 | from decimal import Decimal as D | 3 | from decimal import Decimal as D |
4 | # Put your poloniex api key in market.py | 4 | # Put your poloniex api key in market.py |
@@ -304,11 +304,11 @@ class Trade: | |||
304 | try: | 304 | try: |
305 | cls.ticker_cache[(c1, c2, market.__class__)] = market.fetch_ticker("{}/{}".format(c1, c2)) | 305 | cls.ticker_cache[(c1, c2, market.__class__)] = market.fetch_ticker("{}/{}".format(c1, c2)) |
306 | augment_ticker(cls.ticker_cache[(c1, c2, market.__class__)]) | 306 | augment_ticker(cls.ticker_cache[(c1, c2, market.__class__)]) |
307 | except ccxt.ExchangeError: | 307 | except ExchangeError: |
308 | try: | 308 | try: |
309 | cls.ticker_cache[(c2, c1, market.__class__)] = market.fetch_ticker("{}/{}".format(c2, c1)) | 309 | cls.ticker_cache[(c2, c1, market.__class__)] = market.fetch_ticker("{}/{}".format(c2, c1)) |
310 | augment_ticker(cls.ticker_cache[(c2, c1, market.__class__)]) | 310 | augment_ticker(cls.ticker_cache[(c2, c1, market.__class__)]) |
311 | except ccxt.ExchangeError: | 311 | except ExchangeError: |
312 | cls.ticker_cache[(c1, c2, market.__class__)] = None | 312 | cls.ticker_cache[(c1, c2, market.__class__)] = None |
313 | return cls.get_ticker(c1, c2, market) | 313 | return cls.get_ticker(c1, c2, market) |
314 | 314 | ||