Administrator
2025-07-10 fc3cb779f14794dfab49b3a4ed101b6ea4489495
bug修复
3个文件已修改
11 ■■■■ 已修改文件
l2/code_price_manager.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
servers/data_server.py 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
trade/buy_radical/radical_buy_data_manager.py 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/code_price_manager.py
@@ -231,6 +231,10 @@
            threading.Thread(target=lambda: middle_api_protocol.request(
                middle_api_protocol.load_l2_subscript_codes_rate(cls.__current_rate_dict)), daemon=True).start()
    @classmethod
    def get_current_rate_dict(cls):
        return cls.__current_rate_dict
if __name__ == "__main__":
    print(Buy1PriceManager().get_limit_up_info("002777"))
servers/data_server.py
@@ -12,6 +12,7 @@
import inited_data
from api import low_suction_data_pusher
from code_attribute.gpcode_manager import BlackListCodeManager, HumanRemoveForbiddenManager
from l2.code_price_manager import CurrentPriceManager
from l2.huaxin import huaxin_target_codes_manager
from l2.l2_transaction_data_manager import HuaXinBuyOrderManager
from log_module.log import logger_system, logger_debug, logger_kpl_limit_up, logger_request_api, \
@@ -955,6 +956,7 @@
                else:
                    codes = huaxin_target_codes_manager.HuaXinL2SubscriptCodesManager.get_subscript_codes()
                if codes:
                    current_rate_dict = CurrentPriceManager.get_current_rate_dict()
                    for code in codes:
                        deal_big_order_detail_info = None
                        try:
@@ -1051,13 +1053,13 @@
                                                                                                                 gpcode_manager.get_limit_up_price_as_num(
                                                                                                                     code))
                            # 取要求大单的10%
                            threshold_lack_money = int(round(total_deal_big_order_result[2]/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))
                            (code, code_name, deal_big_order_info, deal_big_order_detail_info, big_order_enough, current_rate_dict.get(code, 0)))
                response_data = json.dumps({"code": 0, "data": fresults})
            except Exception as e:
                response_data = json.dumps({"code": 1, "data": str(1)})
trade/buy_radical/radical_buy_data_manager.py
@@ -734,7 +734,6 @@
            if not human_setting_money:
                # 没有人为设置累计大单阈值就不能加白
                return
            gpcode_manager.MustBuyCodesManager().add_code(code)
            trade_record_log_util.add_must_buy(code, "大单足够")