Administrator
2023-12-01 287b1fe7ef529c65b63596e1a217fc36f952dd1f
bug修复
4个文件已修改
22 ■■■■■ 已修改文件
l2/cancel_buy_strategy.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
third_data/code_plate_key_manager.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
third_data/kpl_block_util.py 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
trade/huaxin/huaxin_trade_server.py 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/cancel_buy_strategy.py
@@ -875,7 +875,7 @@
        sell_indexs = L2LimitUpSellManager().get_limit_up_sell_indexes(code)
        if sell_indexs:
            for index in sell_indexs:
                total_sell_nums += total_datas[index]["val"]["num"]
                total_sell_nums += total_datas[int(index)]["val"]["num"]
        l2_log.l_cancel_debug(code, f"大单买-{total_deal_nums} 板上卖-{total_sell_nums}")
        total_deal_nums -= total_sell_nums
        if total_deal_nums < 0:
third_data/code_plate_key_manager.py
@@ -105,7 +105,7 @@
                        async_log_util.info(logger_kpl_block_can_buy, f"{code}:获取到精选板块-{blocks}")
                    else:
                        # 还没涨停的需要更新精选板块 更新精选板块
                        if abs(float(buy_1_price) - float(limit_up_price)) >= 0.001 or True:
                        if abs(float(buy_1_price) - float(limit_up_price)) >= 0.001:
                            # 非涨停状态
                            UPDATE_TIME_SPACE = 5 * 60
                            time_diff = tool.trade_time_sub(tool.get_now_time_str(), "09:30:00")
third_data/kpl_block_util.py
@@ -18,10 +18,11 @@
    time_str = datetime.datetime.now().strftime("%Y-%m-%d") + " 09:30:00"
    timestamp = time.mktime(time.strptime(time_str, '%Y-%m-%d %H:%M:%S'))
    limit_up_codes = set()
    for k in limit_up_record_datas:
        if code_block_dict.get(k[3]) == block:
            if int(k[5]) < timestamp:
                limit_up_codes.add(k[3])
    if limit_up_record_datas:
        for k in limit_up_record_datas:
            if code_block_dict.get(k[3]) == block:
                if int(k[5]) < timestamp:
                    limit_up_codes.add(k[3])
    return limit_up_codes
trade/huaxin/huaxin_trade_server.py
@@ -658,7 +658,14 @@
            operate = data["operate"]
            if operate == outside_api_command_manager.OPERRATE_ADD:
                data = data["data"]
                rule = SellRule(code=data["code"], buy1_volume=data["buy1_volume"], sell_volume=data["sell_volume"],
                code = data["code"]
                buy1_price = data.get("buy1_price")
                if not buy1_price:
                    buy1_price = gpcode_manager.get_limit_up_price(code)
                    if not buy1_price:
                        raise Exception("尚未获取到涨停价")
                rule = SellRule(code=data["code"], buy1_volume=data["buy1_volume"], buy1_price=buy1_price,
                                sell_volume=data["sell_volume"], sell_price_type=data["sell_price_type"],
                                end_time=data["end_time"])
                SellRuleManager().add_rule(rule)
                self.send_response({"code": 0, "data": {}}, client_id, request_id)