def get_base_currencies(self): '''return base markets supported by this exchange.''' bases = list(set([i.split('-')[0] for i in self.get_markets()])) try: assert sorted(bases) == sorted(self.base_currencies) except AssertionError: raise OutdatedBaseCurrenciesError('Update the hardcoded base currency clist!', {'actual': bases, 'hardcoded': self.base_currencies})
def get_base_currencies(self): '''return base markets supported by this exchange.''' markets = [i for i in self.get_markets() if "et" not in i] # drop tokens bases = list(set([i.split('_')[1].lower() for i in markets])) try: assert sorted(bases) == sorted(self.base_currencies) except AssertionError: raise OutdatedBaseCurrenciesError( 'Update the hardcoded base currency clist!', { 'actual': bases, 'hardcoded': self.base_currencies })