def parse_trade(self, trade, market=None):
    timestamp = self.safe_integer(trade, 'timestamp')
    price = self.safe_number(trade, 'price')
    amount = self.safe_number(trade, 'amount')
    cost = self.safe_number(trade, 'cost')
    id = self.safe_string(trade, 'id')
    type = self.safe_string(trade, 'type')
    takerOrMaker = self.safe_string(trade, 'takerOrMaker')
    side = self.safe_string(trade, 'side')
    datetime = self.iso8601(timestamp)
    order = self.safe_string(trade, 'order')
    symbol = None
    if (market is None):
        marketId = self.safe_string(trade, 'symbol')
        market = self.safe_value(self.markets_by_id, marketId)
    if (market is not None):
        symbol = market['symbol']
    feeData = self.safe_value(trade, 'fee')
    feeCost = self.safe_number(feeData, 'cost')
    feeRate = self.safe_number(feeData, 'rate')
    feeCode = self.safe_string(feeData, 'code')
    feeCurrency = self.safe_currency_code(feeCode)
    fee = {'currency': feeCurrency, 'cost': feeCost, 'rate': feeRate}
    return {'info': trade, 'timestamp': timestamp, 'datetime': datetime, 'symbol': symbol, 'id': id, 'order': order, 'type': type, 'takerOrMaker': takerOrMaker, 'side': side, 'price': price, 'amount': amount, 'cost': cost, 'fee': fee}
def parse_trade(self, trade, market=None):
    timestamp = self.safe_integer(trade, 'timestamp')
    price = self.safe_number(trade, 'price')
    amount = self.safe_number(trade, 'amount')
    cost = self.safe_number(trade, 'cost')
    id = self.safe_string(trade, 'id')
    type = self.safe_string(trade, 'type')
    takerOrMaker = self.safe_string(trade, 'takerOrMaker')
    side = self.safe_string(trade, 'side')
    datetime = self.iso8601(timestamp)
    order = self.safe_string(trade, 'order')
    symbol = None
    if (market is None):
        marketId = self.safe_string(trade, 'symbol')
        market = self.safe_value(self.markets_by_id, marketId)
    if (market is not None):
        symbol = market['symbol']
    feeData = self.safe_value(trade, 'fee')
    feeCost = self.safe_number(feeData, 'cost')
    feeRate = self.safe_number(feeData, 'rate')
    feeCode = self.safe_string(feeData, 'code')
    feeCurrency = self.safe_currency_code(feeCode)
    fee = {'currency': feeCurrency, 'cost': feeCost, 'rate': feeRate}
    return {'info': trade, 'timestamp': timestamp, 'datetime': datetime, 'symbol': symbol, 'id': id, 'order': order, 'type': type, 'takerOrMaker': takerOrMaker, 'side': side, 'price': price, 'amount': amount, 'cost': cost, 'fee': fee}