@barchart/portfolio-api-common 1.25.0 → 1.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -570,7 +570,8 @@ module.exports = (() => {
|
|
|
570
570
|
} else if (data.previousPrice) {
|
|
571
571
|
priceToUse = new Decimal(data.previousPrice);
|
|
572
572
|
} else if (!currentSummary.end.open.getIsZero()) {
|
|
573
|
-
priceToUse = currentSummary.end.value
|
|
573
|
+
priceToUse = AveragePriceCalculator.calculate(position.instrument, currentSummary.end.value, currentSummary.end.open) || Decimal.ZERO;
|
|
574
|
+
priceToUse = priceToUse.opposite();
|
|
574
575
|
} else {
|
|
575
576
|
priceToUse = null;
|
|
576
577
|
}
|
|
@@ -110,6 +110,7 @@ module.exports = (() => {
|
|
|
110
110
|
.withField('legacy.warnings', DataType.NUMBER, true)
|
|
111
111
|
.withField('legacy.drops', DataType.NUMBER, true)
|
|
112
112
|
.withField('miscellany', DataType.AD_HOC, true)
|
|
113
|
+
.withField('email', DataType.AD_HOC, true)
|
|
113
114
|
.withField('system.calculate.processors', DataType.NUMBER, true)
|
|
114
115
|
.withField('system.sequence', DataType.NUMBER)
|
|
115
116
|
.withField('system.version', DataType.STRING)
|
|
@@ -134,6 +135,7 @@ module.exports = (() => {
|
|
|
134
135
|
.withField('legacy.warnings', DataType.NUMBER, true)
|
|
135
136
|
.withField('legacy.drops', DataType.NUMBER, true)
|
|
136
137
|
.withField('miscellany', DataType.AD_HOC, true)
|
|
138
|
+
.withField('email', DataType.AD_HOC, true)
|
|
137
139
|
.withField('system.calculate.processors', DataType.NUMBER, true)
|
|
138
140
|
.schema
|
|
139
141
|
);
|
|
@@ -153,6 +155,7 @@ module.exports = (() => {
|
|
|
153
155
|
.withField('defaults.reinvest', DataType.BOOLEAN, true)
|
|
154
156
|
.withField('defaults.valuation', DataType.forEnum(ValuationType, 'ValuationType'), true)
|
|
155
157
|
.withField('miscellany', DataType.AD_HOC, true)
|
|
158
|
+
.withField('email', DataType.AD_HOC, true)
|
|
156
159
|
.schema
|
|
157
160
|
);
|
|
158
161
|
|
|
@@ -164,6 +167,7 @@ module.exports = (() => {
|
|
|
164
167
|
.withField('defaults.currency', DataType.forEnum(Currency, 'Currency'), true)
|
|
165
168
|
.withField('defaults.reinvest', DataType.BOOLEAN, true)
|
|
166
169
|
.withField('miscellany', DataType.AD_HOC, true)
|
|
170
|
+
.withField('email', DataType.AD_HOC, true)
|
|
167
171
|
.schema
|
|
168
172
|
);
|
|
169
173
|
|