tool.py @@ -44,6 +44,10 @@ return time_str def get_now_timestamp(): return round(time.time() * 1000) # 转为价格,四舍五入保留2位小数 def to_price(_decimal): return _decimal.quantize(decimal.Decimal("0.00"), decimal.ROUND_HALF_UP)