| | |
| | | from log_module.log import logger_l2_error |
| | | from trade.trade_data_manager import PlaceOrderCountManager |
| | | from trade.trade_queue_manager import THSBuy1VolumnManager |
| | | from utils import tool, buy_condition_util |
| | | |
| | | __thsBuy1VolumnManager = THSBuy1VolumnManager() |
| | | |
| | |
| | | def can_place_order_for_cancel_time(code, buy_exec_data): |
| | | if code not in __latest_cancel_l2_data_dict: |
| | | return True |
| | | if L2DataUtil.time_sub_as_ms(buy_exec_data["val"], __latest_cancel_l2_data_dict[code]["val"]) >= 1000: |
| | | threshold_time_space = buy_condition_util.get_cancel_and_buy_space_time(code) |
| | | if L2DataUtil.time_sub_as_ms(buy_exec_data["val"], __latest_cancel_l2_data_dict[code]["val"]) >= threshold_time_space: |
| | | return True |
| | | return False |
| | | |