Administrator
2023-09-04 c0d6849905d7f828ecb02270311817c65c1b77e6
订阅代码增加跟踪日志
3个文件已修改
9 ■■■■■ 已修改文件
code_attribute/first_target_code_data_processor.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
trade/huaxin/trade_api_server.py 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/data_export_util.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
code_attribute/first_target_code_data_processor.py
@@ -209,5 +209,5 @@
                    trade_data_manager.PlaceOrderCountManager().place_order(code)
    gpcode_first_screen_manager.process_ticks(prices)
    logger_l2_codes_subscript.info(f"{request_id}l2代码相关数据加载完成")
    logger_l2_codes_subscript.info(f"({request_id})l2代码相关数据加载完成")
    return tick_datas
trade/huaxin/trade_api_server.py
@@ -428,11 +428,10 @@
        try:
            _datas = huaxin_target_codes_manager.HuaXinL2SubscriptCodesManager.pop()
            if _datas:
                times = _datas[0]
                datas = _datas[1]
                request_id = _datas[2]
                logger_l2_codes_subscript.info("({})读取L2代码处理队列:数量-{}",request_id, len(datas))
                logger_l2_codes_subscript.info("({})读取L2代码处理队列:数量-{}", request_id, len(datas))
                print("时间戳:", times)
                print("内容:", datas)
                # 只处理20s内的数据
@@ -446,7 +445,7 @@
                    root_data = socket_util.encryp_client_params_sign(root_data)
                    pipe_l2.send(json.dumps(root_data))
                    print("设置L2代码结束")
                    logger_l2_codes_subscript.info("({})发送到华鑫L2代码处理队列:数量-{}",request_id, len(datas))
                    logger_l2_codes_subscript.info("({})发送到华鑫L2代码处理队列:数量-{}", request_id, len(datas))
        except Exception as e:
            logging.exception(e)
            logger_l2_codes_subscript.exception(e)
utils/data_export_util.py
@@ -64,6 +64,7 @@
    ws.write(0, 6, '类型')
    ws.write(0, 7, '重复数量')
    ws.write(0, 8, '撤单时间')
    ws.write(0, 9, '订单号')
    index = 0
    for data in datas:
@@ -135,6 +136,7 @@
            else:
                ws.write(index, 6, '卖撤', style)
        ws.write(index, 7, data["re"], style)
        ws.write(index, 9, data.get("orderNo"), style)
        # 查询是否撤单
        if int(data["val"]["operateType"]) == 0:
            cancel = False