utils/tool.py
@@ -222,8 +222,18 @@ return max(price1, price2) # 获取买入价格笼子的最低价 def get_shadow_price(price): fprice = round((100 - random.randint(2, 10)) * price / 100, 2) if price - 0.1 < fprice: fprice = price - 0.1 return round(fprice, 2) if __name__ == "__main__": print(get_buy_min_price(20)) print(get_shadow_price(20)) print(get_shadow_price(20)) print(get_shadow_price(20)) # print(trade_time_sub("11:29:59", 5)) # print(trade_time_sub("10:29:59", 10)) # print(trade_time_add_second("13:29:59", 60)) @@ -264,3 +274,4 @@ except: pass return None