Skip to content

Commit 1c07407

Browse files
committed
[WebInterface] fix multi exchange historical pf display
1 parent dac463c commit 1c07407

File tree

1 file changed

+3
-1
lines changed
  • Services/Interfaces/web_interface/models

1 file changed

+3
-1
lines changed

Services/Interfaces/web_interface/models/trading.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#
1414
# You should have received a copy of the GNU Lesser General Public
1515
# License along with this library.
16+
import decimal
1617
import time
1718
import sortedcontainers
1819

@@ -161,8 +162,9 @@ def _merge_all_exchanges_historical_portfolio(currency, time_frame, from_timesta
161162
merged_result[value[trading_enums.HistoricalPortfolioValue.TIME.value]] = \
162163
value[trading_enums.HistoricalPortfolioValue.VALUE.value]
163164
else:
164-
merged_result[value[trading_enums.HistoricalPortfolioValue.TIME.value]] += \
165+
merged_result[value[trading_enums.HistoricalPortfolioValue.TIME.value]] += str(decimal.Decimal(
165166
value[trading_enums.HistoricalPortfolioValue.VALUE.value]
167+
))
166168
return [
167169
{
168170
trading_enums.HistoricalPortfolioValue.TIME.value: key,

0 commit comments

Comments
 (0)