diff --git a/catalyst/exchange/ccxt/ccxt_exchange.py b/catalyst/exchange/ccxt/ccxt_exchange.py index 3e5d5b29..2d770c8b 100644 --- a/catalyst/exchange/ccxt/ccxt_exchange.py +++ b/catalyst/exchange/ccxt/ccxt_exchange.py @@ -998,13 +998,13 @@ class CCXT(Exchange): """ if len(assets) == 1: - symbol = self.get_symbol(assets[0]) try: + symbol = self.get_symbol(assets[0]) log.debug('fetching single ticker: {}'.format(symbol)) results = dict() results[symbol] = self.api.fetch_ticker(symbol=symbol) - except (ExchangeError, NetworkError) as e: + except (ExchangeError, NetworkError, Exception) as e: log.warn( 'unable to fetch ticker {} / {}: {}'.format( self.name, symbol, e diff --git a/catalyst/exchange/exchange.py b/catalyst/exchange/exchange.py index 84cac446..f32d9a2b 100644 --- a/catalyst/exchange/exchange.py +++ b/catalyst/exchange/exchange.py @@ -703,7 +703,7 @@ class Exchange: positions_value = 0.0 if positions: - assets = set([position.asset for position in positions]) + assets = list(set([position.asset for position in positions])) tickers = self.tickers(assets) for position in positions: