| | |
| | | date = datetime.datetime.now().strftime("%Y-%m-%d") |
| | | pos_list = [] |
| | | path_ = "{}/logs/gp/l2/l2_process.{}.log".format(constant.get_path_prefix(), date) |
| | | if os.path.exists(path_): |
| | | try: |
| | | with open(path_, mode='r', |
| | | encoding="utf-8") as f: |
| | | while True: |
| | |
| | | pos_list.append((int(line.split("-")[0]), int(line.split("-")[1]))) |
| | | except Exception as e: |
| | | logging.exception(e) |
| | | except: |
| | | pass |
| | | return pos_list |
| | | |
| | | |
| | |
| | | return fdatas |
| | | |
| | | |
| | | def load_huaxin_order_detail(date=tool.get_now_date_str()): |
| | | """ |
| | | 加载L2逐笔委托数据 |
| | | @param date: |
| | | @return: |
| | | """ |
| | | fdatas = [] |
| | | path = f"{constant.get_path_prefix()}/logs/huaxin/l2/orderdetail.{date}.log" |
| | | lines = __load_file_content(path) |
| | | for line in lines: |
| | | if line: |
| | | time = __get_async_log_time(line) |
| | | line = line[line.rfind("#") + 1:] |
| | | fdatas.append((time, eval(line))) |
| | | return fdatas |
| | | |
| | | |
| | | def load_pre_close_price(date=tool.get_now_date_str()): |
| | | """ |
| | | 加载之前的收盘价 |