| | |
| | | from l2.huaxin import l2_huaxin_util |
| | | from l2.l2_data_manager import OrderBeginPosInfo |
| | | from l2.l2_data_manager_new import L2TradeDataProcessor |
| | | from l2.l2_data_util import L2DataUtil |
| | | from l2.l2_transaction_data_manager import HuaXinBuyOrderManager, HuaXinSellOrderStatisticManager, BigOrderDealManager |
| | | from log_module import async_log_util |
| | | from log_module.log import hx_logger_l2_debug, logger_l2_trade_buy_queue, logger_debug, hx_logger_l2_upload |
| | |
| | | d = datas[i] |
| | | buy_no = f"{d[6]}" |
| | | if buyno_map and buy_no in buyno_map: |
| | | buy_progress_index = buyno_map[buy_no]["index"] |
| | | # 成交进度位必须是涨停买 |
| | | if L2DataUtil.is_limit_up_price_buy(buyno_map[buy_no]["val"]): |
| | | buy_progress_index = buyno_map[buy_no]["index"] |
| | | break |
| | | return buy_progress_index |
| | | |
| | |
| | | if need_cancel: |
| | | cancel_msg = f"S撤:{cancel_msg}" |
| | | if not need_cancel: |
| | | need_cancel, cancel_msg = FCancelBigNumComputer().need_cancel_for_p(code, big_sell_order_info, |
| | | need_cancel, cancel_msg = FCancelBigNumComputer().need_cancel_for_p(code, |
| | | order_begin_pos) |
| | | # 判断时间是否与本地时间相差5s以上 |
| | | if tool.trade_time_sub(tool.get_now_time_str(), l2_huaxin_util.convert_time(datas[-1][3])) > 10: |
| | | need_cancel, cancel_msg = True, f"成交时间与本地时间相差10S以上,{l2_huaxin_util.convert_time(datas[-1][3])}" |
| | | |
| | | now_seconds = int(tool.get_now_time_str().replace(":", "")) |
| | | 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) |
| | | |