We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d8adb12 commit affa244Copy full SHA for affa244
node-binance-api.js
@@ -2578,7 +2578,7 @@ let api = function Binance( options = {} ) {
2578
roundStep: function ( qty, stepSize ) {
2579
// Integers do not require rounding
2580
if ( Number.isInteger( qty ) ) return qty;
2581
- const qtyString = qty.toFixed( 16 );
+ const qtyString = parseFloat( qty ).toFixed( 16 );
2582
const desiredDecimals = Math.max( stepSize.indexOf( '1' ) - 1, 0 );
2583
const decimalIndex = qtyString.indexOf( '.' );
2584
return parseFloat( qtyString.slice( 0, decimalIndex + desiredDecimals + 1 ) );
0 commit comments