def fetch_markets(self):
    response = self.publicGetMarkets()
    markets = response['data']
    result = []
    self.options['marketsByUuid'] = {}
    for i in range(0, len(markets)):
        market = markets[i]
        id = market['name']
        uuid = market['uuid']
        baseId = market['baseAsset']['symbol']
        quoteId = market['quoteAsset']['symbol']
        base = self.common_currency_code(baseId)
        quote = self.common_currency_code(quoteId)
        symbol = ((base + '/') + quote)
        precision = {'amount': market['baseScale'], 'price': market['quoteScale']}
        entry = {'id': id, 'symbol': symbol, 'base': base, 'quote': quote, 'baseId': baseId, 'quoteId': quoteId, 'active': True, 'precision': precision, 'limits': {'amount': {'min': math.pow(10, (- precision['amount'])), 'max': math.pow(10, precision['amount'])}, 'price': {'min': math.pow(10, (- precision['price'])), 'max': math.pow(10, precision['price'])}, 'cost': {'min': None, 'max': None}}, 'info': market}
        self.options['marketsByUuid'][uuid] = entry
        result.append(entry)
    return result
def fetch_markets(self):
    response = self.publicGetMarkets()
    markets = response['data']
    result = []
    self.options['marketsByUuid'] = {}
    for i in range(0, len(markets)):
        market = markets[i]
        id = market['name']
        uuid = market['uuid']
        baseId = market['baseAsset']['symbol']
        quoteId = market['quoteAsset']['symbol']
        base = self.common_currency_code(baseId)
        quote = self.common_currency_code(quoteId)
        symbol = ((base + '/') + quote)
        precision = {'amount': market['baseScale'], 'price': market['quoteScale']}
        entry = {'id': id, 'symbol': symbol, 'base': base, 'quote': quote, 'baseId': baseId, 'quoteId': quoteId, 'active': True, 'precision': precision, 'limits': {'amount': {'min': math.pow(10, (- precision['amount'])), 'max': math.pow(10, precision['amount'])}, 'price': {'min': math.pow(10, (- precision['price'])), 'max': math.pow(10, precision['price'])}, 'cost': {'min': None, 'max': None}}, 'info': market}
        self.options['marketsByUuid'][uuid] = entry
        result.append(entry)
    return result