def parse_trade(self, trade, market=None):
    priceString = self.safe_string(trade, 'price')
    amountString = self.safe_string(trade, 'amount')
    timestamp = self.safe_integer(trade, 'timestamp')
    side = self.safe_string(trade, 'side')
    id = self.safe_string_2(trade, 'id', 'fillId')
    marketId = self.safe_string(trade, 'market')
    symbol = self.safe_symbol(marketId, market, '-')
    taker = self.safe_value(trade, 'taker')
    takerOrMaker = None
    if (taker is not None):
        takerOrMaker = ('taker' if taker else 'maker')
    feeCostString = self.safe_string(trade, 'fee')
    fee = None
    if (feeCostString is not None):
        feeCurrencyId = self.safe_string(trade, 'feeCurrency')
        feeCurrencyCode = self.safe_currency_code(feeCurrencyId)
        fee = {'cost': feeCostString, 'currency': feeCurrencyCode}
    orderId = self.safe_string(trade, 'orderId')
    return self.safe_trade({'info': trade, 'id': id, 'symbol': symbol, 'timestamp': timestamp, 'datetime': self.iso8601(timestamp), 'order': orderId, 'type': None, 'side': side, 'takerOrMaker': takerOrMaker, 'price': priceString, 'amount': amountString, 'cost': None, 'fee': fee}, market)
def parse_trade(self, trade, market=None):
    priceString = self.safe_string(trade, 'price')
    amountString = self.safe_string(trade, 'amount')
    timestamp = self.safe_integer(trade, 'timestamp')
    side = self.safe_string(trade, 'side')
    id = self.safe_string_2(trade, 'id', 'fillId')
    marketId = self.safe_string(trade, 'market')
    symbol = self.safe_symbol(marketId, market, '-')
    taker = self.safe_value(trade, 'taker')
    takerOrMaker = None
    if (taker is not None):
        takerOrMaker = ('taker' if taker else 'maker')
    feeCostString = self.safe_string(trade, 'fee')
    fee = None
    if (feeCostString is not None):
        feeCurrencyId = self.safe_string(trade, 'feeCurrency')
        feeCurrencyCode = self.safe_currency_code(feeCurrencyId)
        fee = {'cost': feeCostString, 'currency': feeCurrencyCode}
    orderId = self.safe_string(trade, 'orderId')
    return self.safe_trade({'info': trade, 'id': id, 'symbol': symbol, 'timestamp': timestamp, 'datetime': self.iso8601(timestamp), 'order': orderId, 'type': None, 'side': side, 'takerOrMaker': takerOrMaker, 'price': priceString, 'amount': amountString, 'cost': None, 'fee': fee}, market)