| | |
| | | th_sell = 0 |
| | | deal_big_money_info = radical_buy_data_manager.get_total_deal_big_order_info( |
| | | code, gpcode_manager.get_limit_up_price_as_num(code)) |
| | | if deal_big_money_info[1] == 0 and len(codes) == 1: |
| | | deal_big_money_info = list(deal_big_money_info) |
| | | # 没有订阅L2会出现没有值的情况,如果涨停过就拉取之前的涨停买/卖大单 |
| | | deal_big_orders_result = radical_buy_data_manager.request_deal_big_orders(code) |
| | | if deal_big_orders_result: |
| | | buy_datas, sell_datas = deal_big_orders_result[0], deal_big_orders_result[1] |
| | | limit_up_price = gpcode_manager.get_limit_up_price_as_num(code) |
| | | limit_up_price_money_list = [x[0] for x in buy_datas if x[1] == limit_up_price] |
| | | threshold_money = BeforeSubDealBigOrderManager.compute_re_limit_up_big_money_threshold( |
| | | limit_up_price_money_list) |
| | | # 设置买单阈值 |
| | | th_buy = threshold_money |
| | | buy_money = sum(limit_up_price_money_list) |
| | | sell_money = sum([x[0] for x in sell_datas if x[1] == limit_up_price]) |
| | | # 涨停大单净买入 |
| | | deal_big_money_info[1] = buy_money - sell_money |
| | | deal_big_money_info[ |
| | | 2] = radical_buy_data_manager.compute_total_deal_big_order_threshold_money(code, |
| | | limit_up_price, |
| | | threshold_money) |
| | | |
| | | big_money_rate = radical_buy_data_manager.TotalDealBigOrderInfoManager.get_big_order_rate( |
| | | code) |
| | | if not big_money_rate: |