| | |
| | | else: |
| | | total_big_num -= canceled_data["val"]["num"] |
| | | total_big_num += val["num"] |
| | | |
| | | real_place_order_after_count = 0 |
| | | real_place_order_after_num = 0 |
| | | |
| | | # 统计真实下单位置后面未撤的金额 |
| | | for i in range(place_order_index, total_datas[-1]["index"]): |
| | | val = total_datas[i]["val"] |
| | | if not L2DataUtil.is_limit_up_price_buy(val): |
| | | continue |
| | | # 是不是大单 |
| | | if not l2_data_util.is_big_money(val): |
| | | continue |
| | | |
| | | canceled_data = l2_data_source_util.L2DataSourceUtils.get_limit_up_buy_canceled_data_v2(code, |
| | | i, |
| | | total_datas, |
| | | l2_data_util.local_today_canceled_buyno_map.get( |
| | | code)) |
| | | if not canceled_data: |
| | | real_place_order_after_count += 1 |
| | | real_place_order_after_num += val["num"] |
| | | |
| | | # 获取当日的量比 |
| | | volume_rate = code_volumn_manager.get_volume_rate(code) |
| | | |
| | | # 是否需要注意 |
| | | need_pay_attention = (total_left_count <= 10 or total_left_num * float( |
| | | limit_up_price) * 100 < 1000 * 10000) and ( |
| | | real_place_order_after_count <= 10 or real_place_order_after_num * float( |
| | | limit_up_price) * 100 < 1000 * 10000) |
| | | fdata = {"code_info": (code, code_name), "total_num": total_nums, "finish_num": deal_or_cancel_num, |
| | | "buy1_money": output_util.money_desc(buy1_money), |
| | | "big_num_count": total_big_count, |
| | | "big_num_money": output_util.money_desc(total_big_num * float(limit_up_price) * 100), |
| | | "left_count": total_left_count, |
| | | "volume_rate": volume_rate, |
| | | "left_money": output_util.money_desc(total_left_num * float(limit_up_price) * 100)} |
| | | "left_money": output_util.money_desc(total_left_num * float(limit_up_price) * 100), |
| | | "pay_attention": need_pay_attention |
| | | } |
| | | fdatas.append(fdata) |
| | | result = {"code": 0, "data": fdatas} |
| | | self.send_response(result, client_id, request_id) |