Administrator
2024-08-15 b9404847333a972b55766924ad3aa41aac5fd4f4
l2/l2_transaction_data_processor.py
@@ -84,8 +84,7 @@
            limit_up_price = round(float(limit_up_price), 2)
        # 设置成交价
        try:
            current_price_process_manager.set_trade_price(code, datas[-1][1], l2_huaxin_util.convert_time(datas[-1][3]),
                                                          limit_up_price)
            current_price_process_manager.set_trade_price(code, datas[-1][1])
        except:
            pass
        total_datas = l2_data_util.local_today_datas.get(code)
@@ -101,6 +100,18 @@
            big_sell_order_info = None
            try:
                # 统计上板时间
                try:
                    for d in datas:
                        if d[6] > d[7]:
                            # 主动买
                            if d[1] == limit_up_price:
                                # 涨停
                                current_price_process_manager.set_latest_not_limit_up_time(code,
                                                                                           l2_huaxin_util.convert_time(
                                                                                               d[3], with_ms=True))
                except:
                    pass
                # 统计卖单
                big_sell_order_info = HuaXinSellOrderStatisticManager.add_transaction_datas(code, datas, limit_up_price)
@@ -120,7 +131,7 @@
                    # 判断时间是否与本地时间相差5s以上
                    if tool.trade_time_sub(tool.get_now_time_str(), l2_huaxin_util.convert_time(datas[-1][3])) > 10:
                        now_seconds = int(tool.get_now_time_str().replace(":", ""))
                        if now_seconds < int("093200"): #or int("130000") <= now_seconds < int("130200"):
                        if now_seconds < int("093200"):  # or int("130000") <= now_seconds < int("130200"):
                            need_cancel, cancel_msg = True, f"成交时间与本地时间相差10S以上,{l2_huaxin_util.convert_time(datas[-1][3])}"
                    if need_cancel:
                        L2TradeDataProcessor.cancel_buy(code, cancel_msg)