@barchart/portfolio-api-common 1.0.119 → 1.0.120

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.
@@ -38,8 +38,14 @@ module.exports = (() => {
38
38
  this._dataFormat.quantity = null;
39
39
 
40
40
  if (this._single) {
41
- this._dataFormat.instrument = items[0].position.instrument;
41
+ const item = items[0];
42
+
43
+ this._dataFormat.portfolio = item.portfolio.portfolio;
44
+ this._dataFormat.position = item.position.position;
45
+ this._dataFormat.instrument = item.position.instrument;
42
46
  } else {
47
+ this._dataFormat.portfolio = null;
48
+ this._dataFormat.position = null;
43
49
  this._dataFormat.instrument = null;
44
50
  }
45
51
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "1.0.119",
3
+ "version": "1.0.120",
4
4
  "description": "Common classes used by the Portfolio system",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",
@@ -1043,8 +1043,14 @@ module.exports = (() => {
1043
1043
  this._dataFormat.quantity = null;
1044
1044
 
1045
1045
  if (this._single) {
1046
- this._dataFormat.instrument = items[0].position.instrument;
1046
+ const item = items[0];
1047
+
1048
+ this._dataFormat.portfolio = item.portfolio.portfolio;
1049
+ this._dataFormat.position = item.position.position;
1050
+ this._dataFormat.instrument = item.position.instrument;
1047
1051
  } else {
1052
+ this._dataFormat.portfolio = null;
1053
+ this._dataFormat.position = null;
1048
1054
  this._dataFormat.instrument = null;
1049
1055
  }
1050
1056