Skip to content
This repository was archived by the owner on Oct 30, 2023. It is now read-only.

Commit 0a4b492

Browse files
author
Jon Eyrick
authored
Fix for roundStep not rounding properly
1 parent e700bae commit 0a4b492

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

node-binance-api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ let api = function Binance() {
819819
*/
820820
roundStep: function (qty, stepSize) {
821821
const precision = stepSize.toString().split('.')[1].length || 0;
822-
return (((qty / stepSize) | 0) * stepSize).toFixed(precision);
822+
return ((Math.round(qty / stepSize) | 0) * stepSize).toFixed(precision);
823823
},
824824

825825
/**

0 commit comments

Comments
 (0)