| | |
| | | |
| | | import constant |
| | | import inited_data |
| | | from api import low_suction_data_pusher |
| | | from code_attribute.gpcode_manager import BlackListCodeManager, HumanRemoveForbiddenManager |
| | | from l2.huaxin import huaxin_target_codes_manager |
| | | from l2.l2_transaction_data_manager import HuaXinBuyOrderManager |
| | |
| | | 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 |
| | | 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, |
| | |
| | | code) |
| | | # 累计涨停买金额 |
| | | buy_money = output_util.money_desc(limit_up_big_order_detail[0] + limit_up_big_order_detail[1]) |
| | | sell_money = output_util.money_desc(limit_up_big_order_detail[2] + limit_up_big_order_detail[4]) |
| | | sell_money = output_util.money_desc(limit_up_big_order_detail[2] + limit_up_big_order_detail[3]) |
| | | deal_big_order_info.append(buy_money) |
| | | # 累计涨停卖金额 |
| | | deal_big_order_info.append(sell_money) |
| | |
| | | logger_debug.exception(e) |
| | | deal_big_order_info = None |
| | | code_name = gpcode_manager.get_code_name(code) |
| | | fresults.append((code, code_name, deal_big_order_info, deal_big_order_detail_info)) |
| | | |
| | | big_order_enough = 0 |
| | | try: |
| | | total_deal_big_order_result = radical_buy_data_manager.get_total_deal_big_order_info(code, |
| | | gpcode_manager.get_limit_up_price_as_num( |
| | | code)) |
| | | if total_deal_big_order_result and total_deal_big_order_result[0]<=0: |
| | | big_order_enough = 1 |
| | | except: |
| | | pass |
| | | fresults.append((code, code_name, deal_big_order_info, deal_big_order_detail_info, big_order_enough)) |
| | | response_data = json.dumps({"code": 0, "data": fresults}) |
| | | except Exception as e: |
| | | response_data = json.dumps({"code": 1, "data": str(1)}) |
| | |
| | | lambda: request_new_blocks_codes(update_new_block_plates, new_block_codes.keys())) |
| | | except Exception as e: |
| | | logger_debug.exception(e) |
| | | |
| | | # 将数据推送至其他项目 |
| | | try: |
| | | low_suction_data_pusher.push_limit_up_list(result_list_) |
| | | except: |
| | | pass |
| | | |
| | | self.__kplDataManager.save_data(type_, result_list_) |
| | | except Exception as e: |
| | | logger_debug.exception(e) |