admin
23 分钟以前 bc1913abfdc364d97facb3edcd2d54130c8e1ce2
utils/tool.py
@@ -296,13 +296,15 @@
# 获取买入价格笼子的最高价
def get_buy_max_price(price, is_cb=False):
    # price1 = price * (1 + 0.015)  # 服务器版
    price1 = price * (1 + 0.005)  # 本地版
    if not constant.IS_SIMULATED_TRADE:
        price1 = price * (1 + 0.015)  # 服务器版
    else:
        price1 = price * (1 + 0.005)  # 本地版
    if is_cb:
        price1 = math.ceil(price1 * 1000) / 1000
    else:
        price1 = math.ceil(price1 * 100) / 100
    price2 = price + 0.1
    price2 = price + 0.05
    return max(price1, price2)
@@ -364,7 +366,7 @@
def get_limit_up_price(code, pre_price):
    price = (decimal.Decimal(pre_price) * decimal.Decimal(get_limit_up_rate(code))).quantize(decimal.Decimal("0.00"),
                                                                                             decimal.ROUND_HALF_UP)
    return round(price, 2)
    return round(float(price), 2)
def get_limit_down_price(code, pre_price):