Administrator
2025-07-09 5a89d44fed2a9d68e9e4c9ff2eaccfed71c299fb
外部接口修改/bug修复
2个文件已修改
26 ■■■■ 已修改文件
api/outside_api_command_callback.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
servers/data_server.py 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/outside_api_command_callback.py
@@ -1111,10 +1111,6 @@
                                     "l_down_cancel_rate_info": cancel_rate_info,
                                     "expire_rate": expire_rate
                                     }
                            l_down_cancel_rate = CancelRateHumanSettingManager().get_l_down(code)
                            if l_down_cancel_rate is not None:
                                fdata["l_down_cancel_rate"] = l_down_cancel_rate
                            limit_up_data = kpl_data_manager.KPLLimitUpDataRecordManager.record_code_dict.get(code)
                            # 获取当前板块
                            try:
servers/data_server.py
@@ -339,11 +339,12 @@
                    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":
@@ -1026,8 +1027,10 @@
                                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)
@@ -1045,13 +1048,16 @@
                        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)})