code: def cancel_entrust(self, entrust_no):
          
          xq_entrust_list = self._get_xq_history()
          is_have = False
          for xq_entrusts in xq_entrust_list:
              status = xq_entrusts["status"]  # 调仓状态
              for entrust in xq_entrusts["rebalancing_histories"]:
                  if entrust["id"] == entrust_no and status == "pending":
                      is_have = True
                      buy_or_sell = (
                          "buy"
                          if entrust["target_weight"] < entrust["weight"]
                          else "sell"
                      )
                      if (
                          entrust["target_weight"] == 0
                          and entrust["weight"] == 0
                      ):
                          raise exceptions.TradeError(u"移除的股票操作无法撤销,建议重新买入")
                      balance = self.get_balance()[0]
                      volume = (
                          abs(entrust["target_weight"] - entrust["weight"])
                          * balance["asset_balance"]
                          / 100
                      )
                      r = self._trade(
                          security=entrust["stock_symbol"],
                          volume=volume,
                          entrust_bs=buy_or_sell,
                      )
                      if len(r) > 0 and "error_info" in r[0]:
                          raise exceptions.TradeError(
                              u"撤销失败!%s" % ("error_info" in r[0])
                          )
          if not is_have:
              raise exceptions.TradeError(u"撤销对象已失效")
          return True
docs: 对未成交的调仓进行伪撤单
          :param entrust_no:
          :return: