Administrator
2025-03-18 57e437e6e38d6b12c28ddc8fb5b2dde45c2c1556
日志添加/bug修改
4个文件已修改
34 ■■■■■ 已修改文件
api/outside_api_command_callback.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/place_order_single_data_manager.py 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
servers/data_server.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
trade/trade_record_log_util.py 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/outside_api_command_callback.py
@@ -292,6 +292,7 @@
            fresult = {"code": 0}
            if code_list_type == outside_api_command_manager.CODE_LIST_WANT:
                if operate == outside_api_command_manager.OPERRATE_SET:
                    trade_record_log_util.add_want_buy(code)
                    gpcode_manager.WantBuyCodesManager().add_code(code)
                    if l2_trade_util.is_in_forbidden_trade_codes(code):
                        l2_trade_util.remove_from_forbidden_trade_codes(code)
@@ -303,6 +304,7 @@
                        if results:
                            gpcode_manager.CodesNameManager.add_first_code_name(code, results[code])
                elif operate == outside_api_command_manager.OPERRATE_DELETE:
                    trade_record_log_util.remove_want_buy(code)
                    gpcode_manager.WantBuyCodesManager().remove_code(code)
                elif operate == outside_api_command_manager.OPERRATE_GET:
                    codes = gpcode_manager.WantBuyCodesManager().list_code_cache()
l2/place_order_single_data_manager.py
@@ -189,10 +189,26 @@
        @param fdatas:
        @return: (成交数据, 卖单数据)
        """
        def compute_last_sell():
            # 最大买单号
            max_buy_order_no = fdatas[-1][0][6]
            for i in range(len(sell_list) - 1, -1, -1):
                if sell_list[i]['val']['orderNo'] > max_buy_order_no:
                    continue
                return sell_list[i]
            return None
        if not fdatas[-1][2]:
            # 最后一条数据不是涨停成交数据
            return None
        sell_list = cls.__latest_limit_up_sell_list_dict.get(code)
        if not sell_list:
            return None
        last_sell_info = sell_list[-1]
        last_sell_info = compute_last_sell()
        if not last_sell_info:
            return None
        for data in fdatas:
            if not data[2]:
                # 排除主动卖/非涨停卖
servers/data_server.py
@@ -75,6 +75,8 @@
        records = LimitUpDataConstant.history_limit_up_datas
        if not currents:
            currents = self.__kplDataManager.get_data(KPLDataType.LIMIT_UP)
        if currents is None:
            currents = []
        # 获取历史涨停
        if not records:
            KPLLimitUpDataRecordManager.load_total_datas()
trade/trade_record_log_util.py
@@ -155,8 +155,18 @@
    __add_log(TYPE_ACTION, code, {"type": "加白", "msg": msg})
# 加想
def add_want_buy(code, msg=""):
    __add_log(TYPE_ACTION, code, {"type": "加想", "msg": msg})
# 移想
def remove_want_buy(code, msg=""):
    __add_log(TYPE_ACTION, code, {"type": "移想", "msg": msg})
# 加白
def add_common_msg(code, type_,  msg=""):
def add_common_msg(code, type_, msg=""):
    __add_log(TYPE_ACTION, code, {"type": type_, "msg": msg})