| | |
| | | fdatas.append((time_str, codes)) |
| | | return fdatas |
| | | |
| | | |
| | | # 加载华鑫本地买入订单号 |
| | | def load_huaxin_local_buy_no(): |
| | | path = f"{constant.get_path_prefix()}/logs/huaxin_local/l2/l2_buy_no.{tool.get_now_date_str()}.log" |
| | |
| | | if code not in fdatas: |
| | | fdatas[code] = set() |
| | | fdatas[code].add(buy_no) |
| | | return fdatas |
| | | |
| | | |
| | | # 加载华鑫成交的卖单 |
| | | def load_huaxin_transaction_sell_no(code=None,date = tool.get_now_date_str()): |
| | | path = f"{constant.get_path_prefix()}/logs/huaxin/l2/transaction_sell_order.{date}.log" |
| | | fdatas = {} |
| | | if os.path.exists(path): |
| | | with open(path, 'r', encoding="utf-8") as f: |
| | | lines = f.readlines() |
| | | for line in lines: |
| | | if line: |
| | | data = line.split(" - ")[1].strip() |
| | | if data.startswith("["): |
| | | data = data[data.find("]") + 1:].strip() |
| | | data = data.split("code=")[1] |
| | | code_ = data[:6] |
| | | if code and code !=code_: |
| | | continue |
| | | data = data[6:].strip() |
| | | if code_ not in fdatas: |
| | | fdatas[code_] = [] |
| | | fdatas[code_].append(eval(data)) |
| | | return fdatas |
| | | |
| | | |
| | |
| | | |
| | | |
| | | if __name__ == '__main__': |
| | | fdatas = load_kpl_open_limit_up() |
| | | fdatas = load_huaxin_transaction_sell_no("600990") |
| | | print(len(fdatas)) |
| | | # print(get_h_cancel_compute_info("603912")) |
| | | |