def parse_my_trades(self, trades, market=None, since=None, limit=None, params={}):
    grouped = self.group_by(trades, 'trade_id')
    tradeIds = list(grouped.keys())
    result = []
    for i in range(0, len(tradeIds)):
        tradeId = tradeIds[i]
        pair = grouped[tradeId]
        numTradesInPair = len(pair)
        if (numTradesInPair == 2):
            trade = self.parse_my_trade(pair)
            result.append(trade)
    symbol = None
    if (market is not None):
        symbol = market['symbol']
    return self.filter_by_symbol_since_limit(result, symbol, since, limit)
def parse_my_trades(self, trades, market=None, since=None, limit=None, params={}):
    grouped = self.group_by(trades, 'trade_id')
    tradeIds = list(grouped.keys())
    result = []
    for i in range(0, len(tradeIds)):
        tradeId = tradeIds[i]
        pair = grouped[tradeId]
        numTradesInPair = len(pair)
        if (numTradesInPair == 2):
            trade = self.parse_my_trade(pair)
            result.append(trade)
    symbol = None
    if (market is not None):
        symbol = market['symbol']
    return self.filter_by_symbol_since_limit(result, symbol, since, limit)