@barchart/portfolio-api-common 1.0.151 → 1.0.152

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.
@@ -102,6 +102,8 @@ module.exports = (() => {
102
102
  this._dataFormat.quoteChangePercent = null;
103
103
  this._dataFormat.quoteTime = null;
104
104
  this._dataFormat.quoteVolume = null;
105
+ this._dataFormat.quoteChangeDirection = unchanged;
106
+ this._dataFormat.quoteChangeNegative = false;
105
107
 
106
108
  this._dataActual.currentPrice = null;
107
109
  this._dataActual.previousPrice = null;
@@ -161,6 +163,9 @@ module.exports = (() => {
161
163
  this._dataFormat.quoteChangePercent = formatPercent(new Decimal(this._dataActual.quoteChangePercent || 0), 2);
162
164
  this._dataFormat.quoteTime = this._dataActual.quoteTime;
163
165
  this._dataFormat.quoteVolume = formatNumber(this._dataActual.quoteVolume, 0);
166
+
167
+ setTimeout(() => this._dataFormat.quoteChangeDirection = { up: this._dataActual.quoteChange.getIsPositive(), down: this._dataActual.quoteChange.getIsNegative() });
168
+ this._dataFormat.quoteChangeNegative = this._dataActual.quoteChange.getIsNegative();
164
169
  } else {
165
170
  this._dataActual.currentPrice = null;
166
171
  this._dataFormat.currentPrice = null;
@@ -185,7 +190,7 @@ module.exports = (() => {
185
190
  }
186
191
 
187
192
  /**
188
- * A unique (and otherwise meaningless) idenfitifer for the group.
193
+ * A unique (and otherwise meaningless) identifier for the group.
189
194
  *
190
195
  * @public
191
196
  * @returns {Number}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "1.0.151",
3
+ "version": "1.0.152",
4
4
  "description": "Common classes used by the Portfolio system",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",
@@ -1348,6 +1348,8 @@ module.exports = (() => {
1348
1348
  this._dataFormat.quoteChangePercent = null;
1349
1349
  this._dataFormat.quoteTime = null;
1350
1350
  this._dataFormat.quoteVolume = null;
1351
+ this._dataFormat.quoteChangeDirection = unchanged;
1352
+ this._dataFormat.quoteChangeNegative = false;
1351
1353
 
1352
1354
  this._dataActual.currentPrice = null;
1353
1355
  this._dataActual.previousPrice = null;
@@ -1407,6 +1409,9 @@ module.exports = (() => {
1407
1409
  this._dataFormat.quoteChangePercent = formatPercent(new Decimal(this._dataActual.quoteChangePercent || 0), 2);
1408
1410
  this._dataFormat.quoteTime = this._dataActual.quoteTime;
1409
1411
  this._dataFormat.quoteVolume = formatNumber(this._dataActual.quoteVolume, 0);
1412
+
1413
+ setTimeout(() => this._dataFormat.quoteChangeDirection = { up: this._dataActual.quoteChange.getIsPositive(), down: this._dataActual.quoteChange.getIsNegative() });
1414
+ this._dataFormat.quoteChangeNegative = this._dataActual.quoteChange.getIsNegative();
1410
1415
  } else {
1411
1416
  this._dataActual.currentPrice = null;
1412
1417
  this._dataFormat.currentPrice = null;
@@ -1431,7 +1436,7 @@ module.exports = (() => {
1431
1436
  }
1432
1437
 
1433
1438
  /**
1434
- * A unique (and otherwise meaningless) idenfitifer for the group.
1439
+ * A unique (and otherwise meaningless) identifier for the group.
1435
1440
  *
1436
1441
  * @public
1437
1442
  * @returns {Number}