| | |
| | | while True: |
| | | try: |
| | | data = queue_l1_w_strategy_r.get() |
| | | logger_debug.info(f"接收到tick数据:{data}") |
| | | if data.get("type") == 'set_target_codes': |
| | | # [(代码, 时间戳, 价格, 总交易量, 总交易额, 买5, 卖5)] |
| | | market_data_list = data["data"]["data"] |
| | |
| | | if url.path == "/upload_big_order_datas": |
| | | # 接收成交大单数据 |
| | | big_order_datas = params |
| | | # print("upload_big_order_datas", big_order_datas) |
| | | strategy_manager.low_suction_strtegy.add_big_orders(big_order_datas) |
| | | # logger_debug.info("upload_big_order_datas:{}", f"{params}") |
| | | RealTimeEnvInfo().big_order_update_time = tool.get_now_time_str() |
| | | print("获取到大单", os.getpid()) |
| | | result_str = json.dumps({"code": 0}) |
| | | elif url.path == "/upload_block_in_datas": |
| | | # 接收板块流入数据 |
| | | block_in_datas = params |
| | | # print("upload_block_in_datas", block_in_datas) |
| | | strategy_manager.low_suction_strtegy.add_block_in(block_in_datas) |
| | | # logger_debug.info("upload_block_in_datas:{}", f"{params}") |
| | | RealTimeEnvInfo().block_in = (tool.get_now_time_str(), len(block_in_datas)) |
| | | result_str = json.dumps({"code": 0}) |
| | | elif url.path == "/upload_limit_up_list": |
| | | limit_up_list = params |
| | | # print("upload_limit_up_list", limit_up_list) |
| | | strategy_manager.low_suction_strtegy.add_limit_up_list(limit_up_list) |
| | | # logger_debug.info("upload_limit_up_list:{}", f"{params}") |
| | | RealTimeEnvInfo().kpl_current_limit_up = (tool.get_now_time_str(), len(limit_up_list)) |
| | | result_str = json.dumps({"code": 0}) |
| | | else: |
| | |
| | | @param big_orders: [(代码, 买/卖, [订单号,量,金额,最后时间戳,最后价格, 初始时间戳, 初始价格])] 如:[ ('002741', 0, [475820, 91600, 1610328, 92500000, 17.58, 92500000, 17.58])] |
| | | @return: |
| | | """ |
| | | logger_debug.info(f"{type(big_orders)}-{big_orders}") |
| | | codes = [] |
| | | for d in big_orders: |
| | | try: |