Administrator
2024-03-06 dde40bed2653bacfdaebc576ec739d3a322867a1
l2/huaxin/huaxin_delegate_postion_manager.py
@@ -26,8 +26,9 @@
# 获取下单信息
def get_order_info(code):
    info = _place_order_info_dict.get(code)
    if info and time.time() - info[3] > 3:
        async_log_util.info(logger_real_place_order_position, "get_order_info 间隔3s以上:code-{}", code)
    TIME_SPACE_THRESHHOD = 3 if code.find("00") == 0 else 20
    if info and time.time() - info[3] > TIME_SPACE_THRESHHOD:
        async_log_util.info(logger_real_place_order_position, "get_order_info 间隔{}s以上:code-{}",TIME_SPACE_THRESHHOD, code)
        # 间隔3s以上就无效了
        info = None
        _place_order_info_dict.pop(code)
@@ -126,7 +127,7 @@
            real_place_index_info = shadow_place_order_index, RELIABILITY_TYPE_VIRTUAL
        else:
            real_place_index_info = real_place_index, RELIABILITY_TYPE_REAL
    elif time.time() - order_time >= estimate_time_space:
    elif tool.trade_time_sub(datas[-1]['val']['time'], exec_data['val']['time']) >= estimate_time_space:
        # 下单超过2s
        estimate_index = __compute_estimate_order_position(code, exec_data["index"])
        if estimate_index: