From ece1c2a485053d40d7acdf30ef9485291ece0a81 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期五, 05 九月 2025 10:07:56 +0800 Subject: [PATCH] 卖出价格调整 --- utils/tool.py | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/utils/tool.py b/utils/tool.py index e7d936e..f4791f6 100644 --- a/utils/tool.py +++ b/utils/tool.py @@ -281,14 +281,14 @@ # 鑾峰彇涔板叆浠锋牸绗煎瓙鐨勬渶浣庝环 def get_buy_min_price(price, is_cb=False): - price1 = price * (1 - 0.015) + price1 = price * (1 - 0.02) if is_cb: price1 = math.ceil(price1 * 1000) / 1000 else: price1 = math.ceil(price1 * 100) / 100 price2 = price - 0.1 if not is_cb: - return round(min(price1, price2) + 0.05, 2) + return round(min(price1, price2) + 0.001, 2) else: return price1 @@ -429,4 +429,5 @@ if __name__ == "__main__": - print(get_buy_max_price(100.123, is_cb=True)) + # print(get_buy_min_price(6.5, is_cb=False)) + pass -- Gitblit v1.8.0