Administrator
2024-07-03 67fc28735a98395f6946ed13ff7dcd093e35478e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""
分析L2逐笔委托的时间数据
"""
from l2.huaxin import l2_huaxin_util
from log_module import log_export
from utils import tool
 
 
def print_slow_l2_delegates():
    fdatas = log_export.load_huaxin_order_detail()
    times = set()
    for l in fdatas:
        local_time = l[0]
        if int(local_time.replace(":", "")) < int("093000"):
            continue
        l2_time = l2_huaxin_util.convert_time(l[1][5])
        if abs(tool.trade_time_sub(local_time, l2_time)) > 10:
            # print("慢数据:", l)
            times.add(f"{l[1][0][:2]}-{local_time}")
    ts = list(times)
    ts.sort(key=lambda x: x.split('-')[1])
    for t in ts:
        print(t)
 
 
if __name__ == "__main__":
    print_slow_l2_delegates()