Skip to content

Commit fe25860

Browse files
committed
Issues #19 fixed round down to zero
1 parent 8f4d9f6 commit fe25860

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Bot/ExchangeInfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def adjust_quanity(self, q, round_down=True):
1818
if q == 0:
1919
return 0
2020

21-
res = float(Decimal(q).quantize(self.stepSize, rounding=ROUND_DOWN if round_down else ROUND_UP))
21+
res = float(Decimal(q) if self.stepSize == 0.0 else Decimal(q).quantize(self.stepSize, rounding=ROUND_DOWN if round_down else ROUND_UP))
2222
return float(min(max(res, self.minQty), self.maxQty))
2323

2424
def adjust_price(self, q, round_down=True):

0 commit comments

Comments
 (0)