| | |
| | | limit_up_price_money_list = [] |
| | | pre_limit_up_price_money_list = [] |
| | | deal_order_list = BigOrderDealManager().get_total_buy_data_list(code) |
| | | deal_order_ids = set() |
| | | exclude_deal_order_ids = set() |
| | | if deal_order_list: |
| | | for x in deal_order_list: |
| | | if opened_time and int(opened_time.replace(":", "")) > int( |
| | | l2_huaxin_util.convert_time(x[3]).replace(":", "")): |
| | | # 开板时间之前 |
| | | continue |
| | | deal_order_ids.add(x[0]) |
| | | # if opened_time and int(opened_time.replace(":", "")) > int( |
| | | # l2_huaxin_util.convert_time(x[3]).replace(":", "")): |
| | | # # 炸板之前成交的订单不计算在内 |
| | | # continue |
| | | exclude_deal_order_ids.add(x[0]) |
| | | for info in buy_money_list: |
| | | if info[1] != limit_up_price: |
| | | continue |
| | | limit_up_price_money_list.append(info[0]) |
| | | if info[2] in deal_order_ids: |
| | | if info[2] in exclude_deal_order_ids: |
| | | continue |
| | | pre_limit_up_price_money_list.append((info[0], info[2])) |
| | | total_deal_buy_money += info[0] |
| | |
| | | self.set_big_order_threshold(code, threshold_money) |
| | | self.__already_total_deal_big_order_money[code] = (total_deal_buy_money, pre_limit_up_price_money_list) |
| | | async_log_util.info(logger_l2_radical_buy_data, |
| | | f"之前的大买单:{code}-{total_deal_buy_money}-{total_deal_buy_money_info_list}") |
| | | f"开板时间:{opened_time} 之前的大买单:{code}-{total_deal_buy_money}-{total_deal_buy_money_info_list}") |
| | | # 处理大卖单 |
| | | pre_limit_up_price_money_sell_list = [] |
| | | if True: |
| | |
| | | return self.__already_total_deal_big_order_money[code][0] |
| | | return 0 |
| | | |
| | | def get_deal_big_order_money_of_lack(self, code, exclude_order_ids): |
| | | """ |
| | | 获取没有在本地L2成交队列中的成交大单 |
| | | @param exclude_order_ids: |
| | | @param code: |
| | | @return: |
| | | """ |
| | | if code in self.__already_total_deal_big_order_money: |
| | | # [(金额,价格,订单号)] |
| | | money_info_list = self.__already_total_deal_big_order_money[code][1] |
| | | return sum([x[0] for x in money_info_list if x[2] not in exclude_order_ids]) |
| | | return 0 |
| | | |
| | | def get_sell_deal_big_order_money(self, code, threshold_money): |
| | | if code in self.__already_total_sell_deal_big_order_money: |
| | | sellno_map = l2_data_util_new.local_today_sellno_map.get(code) |