| | |
| | | local_today_datas[code].extend(add_datas) |
| | | l2.l2_data_util.load_num_operate_map(local_today_num_operate_map, code, add_datas) |
| | | l2.l2_data_util.load_buy_no_map(local_today_buyno_map, code, add_datas) |
| | | l2_data_log.l2_time_log(code, "process_add_datas 加载完数据") |
| | | if constant.L2_SOURCE_TYPE == constant.L2_SOURCE_TYPE_HUAXIN: |
| | | try: |
| | | # 获取下单位置 |
| | |
| | | state = cls.__CodesTradeStateManager.get_trade_state_cache(code) |
| | | start_index = len(total_datas) - len(add_datas) |
| | | end_index = len(total_datas) - 1 |
| | | l2_data_log.l2_time_log(code, "process_add_datas 开始处理") |
| | | if state == trade_manager.TRADE_STATE_BUY_DELEGATED or state == trade_manager.TRADE_STATE_BUY_PLACE_ORDER or state == trade_manager.TRADE_STATE_BUY_SUCCESS: |
| | | # 已挂单 |
| | | cls.__process_order(code, start_index, end_index, capture_timestamp, is_first_code) |
| | |
| | | # 记录买入信号位置 |
| | | cls.__save_order_begin_data(code, buy_single_index, -1, compute_end_index, buy_nums, buy_count, |
| | | max_num_set_new, None) |
| | | print("保存大单时间", round((t.time() - _start_time) * 1000)) |
| | | _start_time = t.time() |
| | | pass |
| | | l2_data_log.l2_time_log(code, "__start_compute_buy 结束") |
| | | |
| | | # 获取下单起始信号 |
| | | @classmethod |
| | |
| | | async_log_util.info(logger_l2_process, "code:{} 处理数据数量: {} 最终处理时间:{}", code, |
| | | len(_datas), |
| | | round(time.time() * 1000) - now_timestamp) |
| | | l2_data_log.l2_time_log(code, "处理L2逐笔委托结束") |
| | | l2_data_log.l2_time_log(code, f"处理L2逐笔委托结束:处理数据数量: {len(_datas)} 最终处理时间:{round(time.time() * 1000) - now_timestamp}") |
| | | |
| | | @classmethod |
| | | def l2_transaction(cls, code, datas): |