def load_markets(self, reload=False):
    if (not reload):
        if self.markets:
            if (not self.markets_by_id):
                return self.set_markets(self.markets)
            return self.markets
    markets = self.fetch_markets()
    currencies = None
    if self.has['fetchCurrencies']:
        currencies = self.fetch_currencies()
    return self.set_markets(markets, currencies)
def load_markets(self, reload=False):
    if (not reload):
        if self.markets:
            if (not self.markets_by_id):
                return self.set_markets(self.markets)
            return self.markets
    markets = self.fetch_markets()
    currencies = None
    if self.has['fetchCurrencies']:
        currencies = self.fetch_currencies()
    return self.set_markets(markets, currencies)