admin
2025-04-08 70b51a2636858fb8cfbf39d3764d88d07286d8ad
huaxin_client/l1_api_client.py
@@ -164,7 +164,8 @@
        订阅股票指数行情
        """
        # 沪深300
        self.m_api.SubscribeStockIndexData(qcvalueaddproapi.QCVD_EXD_SSE, "000300")  # 沪深300
        self.m_api.SubscribeStockIndexData(qcvalueaddproapi.QCVD_EXD_COMM, "000300")  # 沪深300
        self.m_api.SubscribeStockIndexData(qcvalueaddproapi.QCVD_EXD_SZSE, "000300")
        self.m_api.SubscribeStockIndexData(qcvalueaddproapi.QCVD_EXD_SSE, "000001")  # 上证
        self.m_api.SubscribeStockIndexData(qcvalueaddproapi.QCVD_EXD_SZSE, "399006")  # 创业板指数
        self.m_api.SubscribeStockIndexData(qcvalueaddproapi.QCVD_EXD_SZSE, "399001")  # 深圳成指
@@ -205,6 +206,7 @@
        # 指数数据
        try:
            data = {
                "PreClosePrice":pStockIndexData.PreClosePrice,
                "LastPrice": pStockIndexData.LastPrice,
                "SecurityID": pStockIndexData.SecurityID,
                "UpdateTime": pStockIndexData.UpdateTime,
@@ -213,7 +215,7 @@
                "LXLastPrice": pStockIndexData.LXLastPrice,
            }
            self.stock_index_data_dict[data["SecurityID"]] = data
            logger_debug.info(f"指数行情应答:{data}")
            # logger_debug.info(f"指数行情应答:{data}")
        except Exception as e:
            logging.exception(e)