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

Commit f536947

Browse files
authored
Merge pull request #226 from jaggedsoft/master
Merge from Development
2 parents 5ce071b + 28e1162 commit f536947

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

node-binance-api.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2578,7 +2578,7 @@ let api = function Binance( options = {} ) {
25782578
roundStep: function ( qty, stepSize ) {
25792579
// Integers do not require rounding
25802580
if ( Number.isInteger( qty ) ) return qty;
2581-
const qtyString = qty.toFixed( 16 );
2581+
const qtyString = parseFloat( qty ).toFixed( 16 );
25822582
const desiredDecimals = Math.max( stepSize.indexOf( '1' ) - 1, 0 );
25832583
const decimalIndex = qtyString.indexOf( '.' );
25842584
return parseFloat( qtyString.slice( 0, decimalIndex + desiredDecimals + 1 ) );
@@ -4683,7 +4683,7 @@ let api = function Binance( options = {} ) {
46834683
* @return {undefined}
46844684
*/
46854685
mgAccount: function( callback ,isIsolated = false) {
4686-
const endpoint = 'v1/margin' + (isIsolated)?'/isolated':'' + '/account'
4686+
const endpoint = 'v1/margin' + (isIsolated?'/isolated':'') + '/account'
46874687
signedRequest( sapi + endpoint, {}, function( error, data ) {
46884688
if( callback ) return callback( error, data );
46894689
} );

0 commit comments

Comments
 (0)