| | |
| | | if True: |
| | | print("设置L2代码数量:", len(add_code_set)) |
| | | global latest_add_codes |
| | | async_log_util.info(logger_l2_codes_subscript, f"({request_id})预处理新增订阅代码:{add_code_set - latest_add_codes}") |
| | | async_log_util.info(logger_l2_codes_subscript, |
| | | f"({request_id})预处理新增订阅代码:{add_code_set - latest_add_codes}") |
| | | latest_add_codes = add_code_set |
| | | add_datas = [] |
| | | for d in add_code_list: |
| | | limit_up_price = gpcode_manager.get_limit_up_price(d) |
| | | 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)) |
| | | # 传递笼子价 |
| | | add_datas.append( |
| | | (d, min_volume, limit_up_price, round(tool.get_shadow_price(limit_up_price), 2))) |
| | | huaxin_target_codes_manager.HuaXinL2SubscriptCodesManager.push(add_datas, request_id) |
| | | except Exception as e: |
| | | logging.exception(e) |