| | |
| | | __l2PlaceOrderParamsManagerDict = {} |
| | | __last_buy_single_dict = {} |
| | | __TradeBuyQueue = transaction_progress.TradeBuyQueue() |
| | | __latest_process_unique_keys = {} |
| | | __latest_process_order_unique_keys = {} |
| | | __latest_process_not_order_unique_keys = {} |
| | | # 初始化 |
| | | __TradePointManager = l2_data_manager.TradePointManager() |
| | | __SecondCancelBigNumComputer = SecondCancelBigNumComputer() |
| | |
| | | def __process_order(cls, code, start_index, end_index, capture_time, is_first_code, new_add=True): |
| | | # 增加推出机制 |
| | | unique_key = f"{start_index}-{end_index}" |
| | | if cls.__latest_process_unique_keys.get(code) == unique_key: |
| | | if cls.__latest_process_order_unique_keys.get(code) == unique_key: |
| | | logger_l2_error.error(f"重复处理数据:code-{code} start_index-{start_index} end_index-{end_index}") |
| | | return |
| | | cls.__latest_process_unique_keys[code] = unique_key |
| | | cls.__latest_process_order_unique_keys[code] = unique_key |
| | | |
| | | # S撤 |
| | | def s_cancel(_buy_single_index, _buy_exec_index): |
| | |
| | | new_add=True): |
| | | if compute_end_index < compute_start_index: |
| | | return |
| | | |
| | | unique_key = f"{compute_start_index}-{compute_end_index}" |
| | | if cls.__latest_process_not_order_unique_keys.get(code) == unique_key: |
| | | logger_l2_error.error(f"重复处理数据:code-{code} start_index-{compute_start_index} end_index-{compute_end_index}") |
| | | return |
| | | cls.__latest_process_not_order_unique_keys[code] = unique_key |
| | | |
| | | _start_time = tool.get_now_timestamp() |
| | | total_datas = local_today_datas[code] |
| | | # 处理安全笔数 |