def parse_market(self, market):
    id = self.safe_string(market, 'instrument_id')
    marketType = 'spot'
    spot = True
    future = False
    swap = False
    option = False
    baseId = self.safe_string(market, 'base_currency')
    quoteId = self.safe_string(market, 'quote_currency')
    contractVal = self.safe_float(market, 'contract_val')
    if (contractVal is not None):
        if ('option_type' in market):
            marketType = 'option'
            spot = False
            option = True
            underlying = self.safe_string(market, 'underlying')
            parts = underlying.split('-')
            baseId = self.safe_string(parts, 0)
            quoteId = self.safe_string(parts, 1)
        else:
            marketType = 'swap'
            spot = False
            swap = True
            futuresAlias = self.safe_string(market, 'alias')
            if (futuresAlias is not None):
                swap = False
                future = True
                marketType = 'futures'
                baseId = self.safe_string(market, 'underlying_index')
    base = self.safe_currency_code(baseId)
    quote = self.safe_currency_code(quoteId)
    symbol = (((base + '/') + quote) if spot else id)
    lotSize = self.safe_float_2(market, 'lot_size', 'trade_increment')
    precision = {'amount': self.safe_float(market, 'size_increment', lotSize), 'price': self.safe_float(market, 'tick_size')}
    minAmount = self.safe_float_2(market, 'min_size', 'base_min_size')
    active = True
    fees = self.safe_value_2(self.fees, marketType, 'trading', {})
    return self.extend(fees, {'id': id, 'symbol': symbol, 'base': base, 'quote': quote, 'baseId': baseId, 'quoteId': quoteId, 'info': market, 'type': marketType, 'spot': spot, 'futures': future, 'swap': swap, 'option': option, 'active': active, 'precision': precision, 'limits': {'amount': {'min': minAmount, 'max': None}, 'price': {'min': precision['price'], 'max': None}, 'cost': {'min': precision['price'], 'max': None}}})
def parse_market(self, market):
    id = self.safe_string(market, 'instrument_id')
    marketType = 'spot'
    spot = True
    future = False
    swap = False
    option = False
    baseId = self.safe_string(market, 'base_currency')
    quoteId = self.safe_string(market, 'quote_currency')
    contractVal = self.safe_float(market, 'contract_val')
    if (contractVal is not None):
        if ('option_type' in market):
            marketType = 'option'
            spot = False
            option = True
            underlying = self.safe_string(market, 'underlying')
            parts = underlying.split('-')
            baseId = self.safe_string(parts, 0)
            quoteId = self.safe_string(parts, 1)
        else:
            marketType = 'swap'
            spot = False
            swap = True
            futuresAlias = self.safe_string(market, 'alias')
            if (futuresAlias is not None):
                swap = False
                future = True
                marketType = 'futures'
                baseId = self.safe_string(market, 'underlying_index')
    base = self.safe_currency_code(baseId)
    quote = self.safe_currency_code(quoteId)
    symbol = (((base + '/') + quote) if spot else id)
    lotSize = self.safe_float_2(market, 'lot_size', 'trade_increment')
    precision = {'amount': self.safe_float(market, 'size_increment', lotSize), 'price': self.safe_float(market, 'tick_size')}
    minAmount = self.safe_float_2(market, 'min_size', 'base_min_size')
    active = True
    fees = self.safe_value_2(self.fees, marketType, 'trading', {})
    return self.extend(fees, {'id': id, 'symbol': symbol, 'base': base, 'quote': quote, 'baseId': baseId, 'quoteId': quoteId, 'info': market, 'type': marketType, 'spot': spot, 'futures': future, 'swap': swap, 'option': option, 'active': active, 'precision': precision, 'limits': {'amount': {'min': minAmount, 'max': None}, 'price': {'min': precision['price'], 'max': None}, 'cost': {'min': precision['price'], 'max': None}}})