Bugfix/filter out positions without quantity (#317)

* Filter out positions without any quantity

* Update changelog
This commit is contained in:
Thomas Kaul
2021-08-26 17:45:04 +02:00
committed by GitHub
parent 695c378b48
commit c5bb3023d3
2 changed files with 11 additions and 0 deletions

View File

@@ -211,6 +211,11 @@ export class PortfolioService {
}
for (const item of currentPositions.positions) {
if (item.quantity.lte(0)) {
// Ignore positions without any quantity
continue;
}
const value = item.quantity.mul(item.marketPrice);
const symbolProfile = symbolProfileMap[item.symbol];
const dataProviderResponse = dataProviderResponses[item.symbol];