Skip to content

Commit

Permalink
fix round
Browse files Browse the repository at this point in the history
  • Loading branch information
Th0rgal committed Jul 21, 2020
1 parent 7ac44a3 commit 53ca65e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion binance/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 53ca65e

Please sign in to comment.