Administrator
2025-06-11 01696a5d8c2c3cf3062aa6a8ccbf123547c2dbf0
l2_data_util.py
@@ -28,30 +28,44 @@
# 是否为大单
def is_big_money(val):
def is_big_money(val, is_ge=False):
    """
    判断是否为大单
    @param val: l2数据
    @param is_ge: 是否为创业板
    @return:
    """
    price = float(val["price"])
    money = price * val["num"]
    if price > 3.0:
        if money >= 29900 or val["num"] >= 7999:
    money = round(price * val["num"], 2)
    if is_ge:
        if money >= 29900 or val["num"] >= 2999:
            return True
        else:
            return False
    else:
        max_money = price * 10000
        if money >= max_money * 0.95:
            return True
        if price > 3.0:
            if money >= 29900 or val["num"] >= 7999:
                return True
            else:
                return False
        else:
            return False
            max_money = price * 10000
            if money >= max_money * 0.95:
                return True
            else:
                return False
# 获取大资金的金额
def get_big_money_val(limit_up_price):
    if limit_up_price > 3.0:
        return min(299 * 10000, round(limit_up_price * 7999 * 100))
def get_big_money_val(limit_up_price, is_ge=False):
    if is_ge:
        return min(299 * 10000, round(limit_up_price * 2900 * 100))
    else:
        max_money = limit_up_price * 10000 * 100
        return int(max_money * 0.95)
        if limit_up_price > 3.0:
            return min(299 * 10000, round(limit_up_price * 7999 * 100))
        else:
            max_money = limit_up_price * 10000 * 100
            return int(max_money * 0.95)
# if int(val["num"]) >= constant.BIG_MONEY_NUM:
#     return True