Administrator
4 天以前 48fb7a00951f91bdc707e5dd2d196e5bccb752c3
huaxin_client/l2_data_manager_v2.py
@@ -19,7 +19,7 @@
from log_module import async_log_util
from log_module.async_log_util import huaxin_l2_log
from log_module.log import logger_local_huaxin_l2_error, logger_system, logger_local_huaxin_l2_subscript, \
    logger_local_huaxin_l2_special_volume, logger_debug
    logger_local_huaxin_l2_special_volume, logger_debug, logger_local_huaxin_l2_orderdetail
from utils import tool, shared_memery_util
import collections
import zmq
@@ -70,8 +70,7 @@
            # (最小的量, 涨停价格, 影子单价格, 买的量, 废弃使用, 特殊的量集合)
            self.filter_order_condition_dict[code] = [(min_volume, limit_up_price, shadow_price, buy_volume,
                                                       int(min_volume) // 50, set(special_volumes))]
            huaxin_l2_log.info(logger_local_huaxin_l2_subscript,
                               f"({code})常规过滤条件设置:{self.filter_order_condition_dict[code]}")
            # logger_local_huaxin_l2_subscript.info(f"({code})常规过滤条件设置:{self.filter_order_condition_dict[code]}")
        except Exception as e:
            logger_debug.error(f"{str(e)} - min_volume-{min_volume}")
@@ -230,7 +229,8 @@
                    use_time = time.time() - __start_time
                    if use_time > 0.01:
                        # 记录10ms以上的数据
                        huaxin_l2_log.info(logger_local_huaxin_l2_error, f"耗时:{use_time}s  结束数据:{last_data}")
                        huaxin_l2_log.info(logger_local_huaxin_l2_error,
                                           f"耗时:{use_time}s  结束数据:{last_data} 数据数量:{len(temp_list)}")
                    temp_list = []
                else:
                    if code not in self.temp_order_queue_dict:
@@ -241,6 +241,7 @@
            except Exception as e:
                logging.exception(e)
                logger_local_huaxin_l2_error.exception(e)
            finally:
                temp_list.clear()
@@ -276,8 +277,8 @@
                        break
                    self.l2_transaction_codes.add(code)
                    time.sleep(0.001)
            except:
                pass
            except Exception as e:
                logger_local_huaxin_l2_error.exception(e)
            finally:
                temp_list.clear()