def parse_trade(self, trade, market=None):
    timestamp = self.safe_timestamp_2(trade, 'time', 'datetime')
    fee = None
    feeCost = self.safe_float(trade, 'commission')
    if (feeCost is not None):
        feeCurrency = (market['quote'] if market else None)
        fee = {'cost': feeCost, 'currency': feeCurrency}
    orderId = self.safe_string(trade, 'clientorderid')
    id = self.safe_string(trade, 'id')
    side = self.safe_string_lower(trade, 'type')
    amount = self.safe_float(trade, 'quantity')
    price = self.safe_float(trade, 'price')
    cost = None
    if (amount is not None):
        if (price is not None):
            cost = (amount * price)
    symbol = None
    if (market is not None):
        symbol = market['symbol']
    return {'id': id, 'info': trade, 'timestamp': timestamp, 'datetime': self.iso8601(timestamp), 'symbol': symbol, 'order': orderId, 'type': None, 'side': side, 'takerOrMaker': None, 'price': price, 'amount': amount, 'cost': cost, 'fee': fee}
def parse_trade(self, trade, market=None):
    timestamp = self.safe_timestamp_2(trade, 'time', 'datetime')
    fee = None
    feeCost = self.safe_float(trade, 'commission')
    if (feeCost is not None):
        feeCurrency = (market['quote'] if market else None)
        fee = {'cost': feeCost, 'currency': feeCurrency}
    orderId = self.safe_string(trade, 'clientorderid')
    id = self.safe_string(trade, 'id')
    side = self.safe_string_lower(trade, 'type')
    amount = self.safe_float(trade, 'quantity')
    price = self.safe_float(trade, 'price')
    cost = None
    if (amount is not None):
        if (price is not None):
            cost = (amount * price)
    symbol = None
    if (market is not None):
        symbol = market['symbol']
    return {'id': id, 'info': trade, 'timestamp': timestamp, 'datetime': self.iso8601(timestamp), 'symbol': symbol, 'order': orderId, 'type': None, 'side': side, 'takerOrMaker': None, 'price': price, 'amount': amount, 'cost': cost, 'fee': fee}