Administrator
2024-01-30 21c96ed504f93f16ce6f8a3ccf164a87c9edd9c0
l2/l2_transaction_data_processor.py
@@ -13,6 +13,7 @@
from msg import push_msg_manager
from trade import current_price_process_manager, trade_manager
from trade.deal_big_money_manager import DealOrderNoManager
from utils import tool
class HuaXinTransactionDatasProcessor:
@@ -60,10 +61,12 @@
                except Exception as e:
                    async_log_util.error(hx_logger_l2_debug, str(e))
                try:
                    cresult = LCancelBigNumComputer().add_transaction_datas(code, datas)
                    if cresult[0]:
                        L2TradeDataProcessor.cancel_buy(code, f"L后成交太快撤单:{cresult[1]}")
                        order_begin_pos = None
                    # 下单2s后才开始生效
                    if tool.trade_time_sub(total_datas[-1]["val"]["time"],total_datas[order_begin_pos.buy_exec_index]["val"]["time"]) > 2:
                        cresult = LCancelBigNumComputer().add_transaction_datas(code, datas)
                        if cresult[0]:
                            L2TradeDataProcessor.cancel_buy(code, f"L后成交太快撤单:{cresult[1]}")
                            order_begin_pos = None
                except Exception as e:
                    async_log_util.error(hx_logger_l2_debug, str(e))