| | |
| | | total_datas = None |
| | | else: |
| | | date = tool.get_now_date_str() |
| | | delegate_datas = data_export_util.get_l2_datas(code, total_datas, date=date, end_index=end_index, fast_mode=int(fast)) |
| | | delegate_datas = data_export_util.get_l2_datas(code, total_datas, date=date, end_index=end_index, |
| | | fast_mode=int(fast)) |
| | | code_name = gpcode_manager.get_code_name(code) |
| | | response_data = json.dumps({"code": 0, "data": {"code": code, "code_name": code_name, |
| | | "data": {"delegates": delegate_datas, |
| | | "transactions": [] }}}) |
| | | "transactions": []}}}) |
| | | except Exception as e: |
| | | logger_debug.exception(e) |
| | | elif url.path == "/get_l2_datas_of_sell_orders": |
| | |
| | | limit_up_big_order_detail = radical_buy_data_manager.get_total_detal_big_order_details( |
| | | 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[3]) |
| | | 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[3]) |
| | | deal_big_order_info.append(buy_money) |
| | | # 累计涨停卖金额 |
| | | deal_big_order_info.append(sell_money) |
| | |
| | | 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: |
| | | gpcode_manager.get_limit_up_price_as_num( |
| | | code)) |
| | | # 取要求大单的10% |
| | | threshold_lack_money = int(round(total_deal_big_order_result[2]/10)) |
| | | if total_deal_big_order_result and total_deal_big_order_result[0] <= threshold_lack_money: |
| | | big_order_enough = 1 |
| | | except: |
| | | pass |
| | | fresults.append((code, code_name, deal_big_order_info, deal_big_order_detail_info, big_order_enough)) |
| | | 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)}) |