diff --git a/CHANGELOG.md b/CHANGELOG.md index 77294b88..d12764c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file. - Fixed sorting symbols open trades first by [@uhliksk](https://github.com/uhliksk) - [#564](https://github.com/chrisleekr/binance-trading-bot/pull/564) - Fixed the issue that cannot export huge logs - [#561](https://github.com/chrisleekr/binance-trading-bot/pull/561), [#567](https://github.com/chrisleekr/binance-trading-bot/pull/567) +- Fixed the balance calculation to include dust balances by [@uhliksk](https://github.com/uhliksk) - [#571](https://github.com/chrisleekr/binance-trading-bot/pull/571) Thanks [@uhliksk](https://github.com/uhliksk) for your great contributions. 💯 :heart: diff --git a/public/js/ProfitLossWrapper.js b/public/js/ProfitLossWrapper.js index da28e4ad..4fc4185b 100644 --- a/public/js/ProfitLossWrapper.js +++ b/public/js/ProfitLossWrapper.js @@ -125,9 +125,14 @@ class ProfitLossWrapper extends React.Component { : 0; const quoteAssetTotal = - profitAndLoss.amount + +profitAndLoss.free + +profitAndLoss.locked; + profitAndLoss.estimatedBalance - + +profitAndLoss.profit + + +profitAndLoss.free + + +profitAndLoss.locked; const openTradesRatio = quoteAssetTotal - ? (profitAndLoss.amount / quoteAssetTotal) * 100 + ? ((profitAndLoss.estimatedBalance - +profitAndLoss.profit) / + quoteAssetTotal) * + 100 : 0; return (