| | |
| | | import os |
| | | import constant |
| | | from log_module.log import logger_debug, logger_common |
| | | from utils import huaxin_util |
| | | |
| | | # 获取logger实例 |
| | | logger = logger_common |
| | | |
| | |
| | | # 遍历转换后的列表 |
| | | for sublist in true_lists: |
| | | if sublist and sublist[0] and sublist[0][0] == code: |
| | | logger.info(f"找到L2大单,对应行列表: sublist[0]===={sublist[0]}") |
| | | # print(f"找到大单的对应行列表 sublist[0]===={sublist[0]}") |
| | | # 格式 |
| | | # sublist[0]====['002413', 0, [3996643, 287200, 1421640, 93453070, 4.95]] |
| | | # sublist[0]====['股票代码', 买入, [订单号, 手数, 订单金额, 时间, 成交价]] |
| | | # 时间是华鑫格式要转换一下 |
| | | if sublist[0][2][3] is not None: |
| | | huaxin_time_format = sublist[0][2][3] |
| | | order_transaction_time = huaxin_util.convert_time(huaxin_time_format) |
| | | logger.info(f"找到L2大单,对应行列表: sublist[0]===={sublist[0]} 大单金额:{sublist[0][2][2]}转换后时间格式:{order_transaction_time}") |
| | | |
| | | found = True # 设置标志为 True,表示找到了 |
| | | |
| | | # 检查是否没有找到特定股票代码 |