code: def deal_list_query(self, code="", trd_env=TrdEnv.REAL, acc_id=0, acc_index=0):
          
          ret, msg = self._check_trd_env(trd_env)
          if ret != RET_OK:
              return ret, msg
  
          ret, msg, acc_id = self._check_acc_id_and_acc_index(trd_env, acc_id, acc_index)
          if ret != RET_OK:
              return ret, msg
  
          ret, msg, stock_code = self._check_stock_code(code)
          if ret != RET_OK:
              return ret, msg
  
          query_processor = self._get_sync_query_processor(
              DealListQuery.pack_req, DealListQuery.unpack_rsp)
  
          kargs = {
              'code': stock_code,
              'trd_mkt': self.__trd_mkt,
              'trd_env': trd_env,
              'acc_id': acc_id,
              'conn_id': self.get_sync_conn_id()
              }
          ret_code, msg, deal_list = query_processor(**kargs)
          if ret_code != RET_OK:
              return RET_ERROR, msg
  
          col_list = [
              "code", "stock_name", "deal_id", "order_id", "qty", "price",
              "trd_side", "create_time", "counter_broker_id", "counter_broker_name"
          ]
          deal_list_table = pd.DataFrame(deal_list, columns=col_list)
  
          return RET_OK, deal_list_table
docs: for querying deal list