From 53ca65e7eb1569907271da11d40717f6e4f31ae5 Mon Sep 17 00:00:00 2001 From: Thomas Marchand Date: Tue, 21 Jul 2020 21:52:00 +0200 Subject: [PATCH] fix round --- binance/client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/binance/client.py b/binance/client.py index a6788f5..19f7d38 100644 --- a/binance/client.py +++ b/binance/client.py @@ -63,7 +63,8 @@ def assert_symbol_exists(self, symbol): def round(self, symbol, amount): if self.loaded: - amount = round(amount, self.symbols[symbol]["baseAssetPrecision"]) + precision = self.symbols[symbol]["baseAssetPrecision"] + return f"%.{precision}f" % round(amount, precision) return amount def assert_symbol(self, symbol):