Administrator
2023-07-11 d6d3d921fab3484b4a103ea6030116e5fd4054ce
trade/current_price_process_manager.py
@@ -122,7 +122,13 @@
            try:
                add_code_set = set(add_code_list)
                global latest_add_codes
                if not latest_add_codes or tuple(latest_add_codes) != tuple(add_code_set):
                if not latest_add_codes:
                    latest_add_codes = set()
                # 判断设置的代码是否相同
                dif1 = latest_add_codes - add_code_set
                dif2 = add_code_set - latest_add_codes
                if dif1 or dif2:
                    print("设置L2代码数量:", len(add_code_set))
                    latest_add_codes = add_code_set
                    add_datas = []
                    for d in add_code_list:
@@ -130,7 +136,7 @@
                        limit_up_price = round(float(limit_up_price), 2)
                        min_volume = int(round(50 * 10000 / limit_up_price))
                        add_datas.append((d, min_volume, limit_up_price))
                        huaxin_target_codes_manager.push(add_datas)
                    huaxin_target_codes_manager.push(add_datas)
            except Exception as e:
                logging.exception(e)
        else: