nodes: 0, module; 1, function_definition; 2, function_name:get_user_trades; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, expression_statement; 10, expression_statement; 11, expression_statement; 12, comment:# TODO Workaround for the broken limit param in QuadrigaCX API; 13, return_statement; 14, identifier:limit; 15, integer:0; 16, identifier:offset; 17, integer:0; 18, identifier:sort; 19, string; 20, comment:"""Return user's trade history.
  
          :param limit: Maximum number of trades to return. If set to 0 or lower,
              all trades are returned (default: 0).
          :type limit: int
          :param offset: Number of trades to skip.
          :type offset: int
          :param sort: Method used to sort the results by date and time. Allowed
              values are "desc" for descending order, and "asc" for ascending
              order (default: "desc").
          :type sort: str | unicode
          :return: User's trade history.
          :rtype: [dict]
          """; 21, call; 22, assignment; 23, conditional_expression:res[:limit] if len(res) > limit > 0 else res; 24, string_content:desc; 25, attribute; 26, argument_list; 27, identifier:res; 28, call; 29, subscript; 30, comparison_operator:len(res) > limit > 0; 31, identifier:res; 32, identifier:self; 33, identifier:_log; 34, string; 35, attribute; 36, argument_list; 37, identifier:res; 38, slice; 39, call; 40, identifier:limit; 41, integer:0; 42, string_content:get user trades; 43, attribute; 44, identifier:post; 45, keyword_argument; 46, keyword_argument; 47, identifier:limit; 48, identifier:len; 49, argument_list; 50, identifier:self; 51, identifier:_rest_client; 52, identifier:endpoint; 53, string; 54, identifier:payload; 55, dictionary; 56, identifier:res; 57, string_content:/user_transactions; 58, pair; 59, pair; 60, pair; 61, pair; 62, string; 63, attribute; 64, string; 65, identifier:limit; 66, string; 67, identifier:offset; 68, string; 69, identifier:sort; 70, string_content:book; 71, identifier:self; 72, identifier:name; 73, string_content:limit; 74, string_content:offset; 75, string_content:sort
code: def get_user_trades(self, limit=0, offset=0, sort='desc'):
          """Return user's trade history.
  
          :param limit: Maximum number of trades to return. If set to 0 or lower,
              all trades are returned (default: 0).
          :type limit: int
          :param offset: Number of trades to skip.
          :type offset: int
          :param sort: Method used to sort the results by date and time. Allowed
              values are "desc" for descending order, and "asc" for ascending
              order (default: "desc").
          :type sort: str | unicode
          :return: User's trade history.
          :rtype: [dict]
          """
          self._log('get user trades')
          res = self._rest_client.post(
              endpoint='/user_transactions',
              payload={
                  'book': self.name,
                  'limit': limit,
                  'offset': offset,
                  'sort': sort
              }
          )
          # TODO Workaround for the broken limit param in QuadrigaCX API
          return res[:limit] if len(res) > limit > 0 else res