Skip to content

Commit

Permalink
Merge pull request ccxt#8919 from frosty00/binance-parseBalance
Browse files Browse the repository at this point in the history
binance fetchBalance edits
  • Loading branch information
kroitor authored Apr 10, 2021
2 parents ac69959 + 31df016 commit e28f23a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions js/binance.js
Original file line number Diff line number Diff line change
Expand Up @@ -1237,8 +1237,8 @@ module.exports = class binance extends Exchange {
const currencyId = this.safeString (balance, 'asset');
const code = this.safeCurrencyCode (currencyId);
const account = this.account ();
account['free'] = this.safeNumber (balance, 'free');
account['used'] = this.safeNumber (balance, 'locked');
account['free'] = this.safeString (balance, 'free');
account['used'] = this.safeString (balance, 'locked');
result[code] = account;
}
} else {
Expand All @@ -1251,13 +1251,13 @@ module.exports = class binance extends Exchange {
const currencyId = this.safeString (balance, 'asset');
const code = this.safeCurrencyCode (currencyId);
const account = this.account ();
account['free'] = this.safeNumber (balance, 'availableBalance');
account['used'] = this.safeNumber (balance, 'initialMargin');
account['total'] = this.safeNumber2 (balance, 'marginBalance', 'balance');
account['free'] = this.safeString (balance, 'availableBalance');
account['used'] = this.safeString (balance, 'initialMargin');
account['total'] = this.safeString2 (balance, 'marginBalance', 'balance');
result[code] = account;
}
}
return this.parseBalance (result);
return this.parseBalance (result, false);
}

async fetchOrderBook (symbol, limit = undefined, params = {}) {
Expand Down

0 comments on commit e28f23a

Please sign in to comment.