class_docstr: A Bitstamp live broker.
  
  :param clientId: Client id.
  :type clientId: string.
  :param key: API key.
  :type key: string.
  :param secret: API secret.
  :type secret: string.
  
  
  .. note::
      * Only limit orders are supported.
      * Orders are automatically set as **goodTillCanceled=True** and  **allOrNone=False**.
      * BUY_TO_COVER orders are mapped to BUY orders.
      * SELL_SHORT orders are mapped to SELL orders.
      * API access permissions should include:
  
        * Account balance
        * Open orders
        * Buy limit order
        * User transactions
        * Cancel order
        * Sell limit order
code: def _onUserTrades(self, trades):
      for trade in trades:
          order = self.__activeOrders.get(trade.getOrderId())
          if order is not None:
              fee = trade.getFee()
              fillPrice = trade.getBTCUSD()
              btcAmount = trade.getBTC()
              dateTime = trade.getDateTime()
  
              # Update cash and shares.
              self.refreshAccountBalance()
              # Update the order.
              orderExecutionInfo = broker.OrderExecutionInfo(
                  fillPrice, abs(btcAmount), fee, dateTime
              )
              order.addExecutionInfo(orderExecutionInfo)
              if not order.isActive():
                  self._unregisterOrder(order)
              # Notify that the order was updated.
              if order.isFilled():
                  eventType = broker.OrderEvent.Type.FILLED
              else:
                  eventType = broker.OrderEvent.Type.PARTIALLY_FILLED
              self.notifyOrderEvent(
                  broker.OrderEvent(
                      order, eventType, orderExecutionInfo
                  )
              )
          else:
              common.logger.info(
                  "Trade %d refered to order %d that is not active"
                  % (trade.getId(), trade.getOrderId())
              )
  
imports: import threading
  import time
  from six.moves import queue
  from pyalgotrade import broker
  from pyalgotrade.bitstamp import httpclient
  from pyalgotrade.bitstamp import common
label_desc: Use image node_id 8 for calling the LiveBroker obj's underlying member method code with example usage: obj._onUserTrades(trades) without return types