Administrator
2023-10-11 25ccb07e6d61bac68d5412a4688c6c89a041af21
交易记录日志优化
1个文件已修改
11 ■■■■ 已修改文件
output/code_info_output.py 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
output/code_info_output.py
@@ -12,6 +12,7 @@
import code_attribute
from code_attribute import code_volumn_manager, limit_up_time_manager, global_data_loader, gpcode_manager
import constant
from l2.l2_data_util import L2DataUtil
from utils import global_util, tool
from log_module import log, log_export
from l2 import l2_data_manager, l2_data_util, transaction_progress, l2_data_manager_new, code_price_manager
@@ -369,11 +370,15 @@
                                             f"【{format_l2_data(total_datas[data['buy_single_index']])}】-【{format_l2_data(total_datas[data['buy_exec_index']])}】",
                                             extra_datas))
                elif type == trade_record_log_util.TYPE_REAL_PLACE_ORDER_POSITION:
                    _datas = []
                    for i in range(data['index'], 0, -1):
                        if total_datas[i]['val']['num'] * float(total_datas[i]['val']['price']) >= 3000:
                            records_new_data.append(
                                (time_, "实际挂单位", f"【{format_l2_data(total_datas[i])}】", []))
                        if L2DataUtil.is_limit_up_price_buy(total_datas[i]['val']) and total_datas[i]['val'][
                            'num'] * float(total_datas[i]['val']['price']) >= 3000:
                            if len(_datas) >= 2:
                            break
                            _datas.append(f"【{format_l2_data(total_datas[i])}】")
                    records_new_data.append(
                        (time_, "实际挂单位", "".join(_datas), []))
                elif type == trade_record_log_util.TYPE_CANCEL_WATCH_INDEXES:
                    indexes = data['watch_indexes']