def market_id(self, symbol):
    market = self.market(symbol)
    return (market['id'] if (type(market) is dict) else symbol)
def market_id(self, symbol):
    market = self.market(symbol)
    return (market['id'] if (type(market) is dict) else symbol)