| | |
| | | extra_datas.append(f"M值:{money_desc(data['m_val'])}") |
| | | extra_datas.append(f"安全笔数:{data['safe_count']}") |
| | | |
| | | records_new_data.append((time_, "", "-------------------------", [])) |
| | | records_new_data.append((time_, "下单", |
| | | f"【{format_l2_data(total_datas[data['buy_single_index']])}】-【{format_l2_data(total_datas[data['buy_exec_index']])}】", |
| | | data)) |
| | | extra_datas)) |
| | | elif type == trade_record_log_util.TYPE_REAL_PLACE_ORDER_POSITION: |
| | | 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])}】", None)) |
| | | (time_, "实际挂单位", f"【{format_l2_data(total_datas[i])}】", [])) |
| | | break |
| | | |
| | | elif type == trade_record_log_util.TYPE_CANCEL_WATCH_INDEXES: |
| | |
| | | elif cancel_type == trade_record_log_util.CancelWatchIndexesInfo.CANCEL_TYPE_S: |
| | | records_new_data.append((time_, "S撤囊括", desc, indexes_data)) |
| | | elif type == trade_record_log_util.TYPE_FORBIDDEN_BUY: |
| | | records_new_data.append((time_, "加入黑名单", f"原因:{data['msg']}", None)) |
| | | records_new_data.append((time_, "加入黑名单", f"原因:{data['msg']}", [])) |
| | | elif type == trade_record_log_util.TYPE_CANT_PLACE_ORDER: |
| | | records_new_data.append((time_, "不能下单", f"原因:{data['msg']}", None)) |
| | | records_new_data.append((time_, "不能下单", f"原因:{data['msg']}", [])) |
| | | elif type == trade_record_log_util.TYPE_CANCEL: |
| | | records_new_data.append((time_, "撤单", f"原因:{data['msg']}", None)) |
| | | records_new_data.append((time_, "撤单", f"原因:{data['msg']}", [])) |
| | | if records_new_data: |
| | | for d in records_new_data: |
| | | records_new.append(f"【{d[0]}】" + "{:<10}".format(f'【{d[1]}】') + d[2]) |
| | | except Exception as e: |
| | | logging.exception(e) |
| | | |
| | | records_new.reverse() |
| | | records_new_data.reverse() |
| | | return break_time, records_new, records_new_data |
| | | |
| | | |