docs: def etfindex(
          self, index_id="", min_volume=0, max_discount=None, min_discount=None
      ):
          """
          以字典形式返回 指数ETF 数据
          :param index_id: 获取指定的指数
          :param min_volume: 最小成交量
          :param min_discount: 最低溢价率, 适用于溢价套利, 格式 "-1.2%", "-1.2", -0.012 三种均可
          :param max_discount: 最高溢价率, 适用于折价套利, 格式 "-1.2%", "-1.2", -0.012 三种均可
          :return: {"fund_id":{}}
          """
          # 添加当前的ctime
          self.__etf_index_url = self.__etf_index_url.format(
              ctime=int(time.time())
          )
          # 请求数据
          rep = requests.get(self.__etf_index_url)
          # 获取返回的json字符串, 转化为字典
          etf_json = rep.json()
  
          # 格式化返回的json字符串
          data = self.formatetfindexjson(etf_json)
  
          # 过滤
          if index_id:
              # 指定跟踪的指数代码
              data = {
                  fund_id: cell
                  for fund_id, cell in data.items()
                  if cell["index_id"] == index_id
              }
          if min_volume:
              # 过滤小于指定交易量的数据
              data = {
                  fund_id: cell
                  for fund_id, cell in data.items()
                  if float(cell["volume"]) >= min_volume
              }
          if min_discount is not None:
              # 指定最小溢价率
              if isinstance(min_discount, str):
                  if min_discount.endswith("%"):
                      # 如果是字符串形式,先转为浮点形式
                      min_discount = self.percentage2float(min_discount)
                  else:
                      min_discount = float(min_discount) / 100.
              data = {
                  fund_id: cell
                  for fund_id, cell in data.items()
                  if self.percentage2float(cell["discount_rt"]) >= min_discount
              }
          if max_discount is not None:
              # 指定最大溢价率
              if isinstance(max_discount, str):
                  if max_discount.endswith("%"):
                      # 如果是字符串形式,先转为浮点形式
                      max_discount = self.percentage2float(max_discount)
                  else:
                      max_discount = float(max_discount) / 100.
              data = {
                  fund_id: cell
                  for fund_id, cell in data.items()
                  if self.percentage2float(cell["discount_rt"]) <= max_discount
              }
  
          self.__etfindex = data
          return self.__etfindex