@barchart/portfolio-api-common 1.0.35 → 1.0.36

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.
@@ -56,6 +56,15 @@ module.exports = (() => {
56
56
  return client;
57
57
  }
58
58
 
59
+ /**
60
+ * @static
61
+ * @public
62
+ * @returns {PositionSummarySchema}
63
+ */
64
+ static get DISPLAY() {
65
+ return display;
66
+ }
67
+
59
68
  toString() {
60
69
  return '[PositionSummarySchema]';
61
70
  }
@@ -123,5 +132,37 @@ module.exports = (() => {
123
132
  .schema
124
133
  );
125
134
 
135
+ const display = new PositionSummarySchema(SchemaBuilder.withName('display')
136
+ .withField('user', DataType.STRING)
137
+ .withField('portfolio', DataType.STRING)
138
+ .withField('position', DataType.STRING)
139
+ .withField('instrument.id', DataType.STRING)
140
+ .withField('instrument.name', DataType.STRING)
141
+ .withField('instrument.type', DataType.STRING)
142
+ .withField('instrument.currency', DataType.forEnum(Currency, 'Currency'))
143
+ .withField('instrument.delist', DataType.DAY, true)
144
+ .withField('instrument.symbol.barchart', DataType.STRING, true)
145
+ .withField('instrument.symbol.display', DataType.STRING, true)
146
+ .withField('frame', DataType.forEnum(PositionSummaryFrame, 'PositionSummaryFrame'))
147
+ .withField('start.date', DataType.DAY)
148
+ .withField('start.sequence', DataType.NUMBER)
149
+ .withField('start.open', DataType.DECIMAL)
150
+ .withField('start.basis', DataType.DECIMAL)
151
+ .withField('start.value', DataType.DECIMAL)
152
+ .withField('end.date', DataType.DAY)
153
+ .withField('end.sequence', DataType.NUMBER)
154
+ .withField('end.open', DataType.DECIMAL)
155
+ .withField('end.basis', DataType.DECIMAL)
156
+ .withField('end.value', DataType.DECIMAL)
157
+ .withField('period.buys', DataType.DECIMAL)
158
+ .withField('period.sells', DataType.DECIMAL)
159
+ .withField('period.income', DataType.DECIMAL)
160
+ .withField('period.realized', DataType.DECIMAL)
161
+ .withField('period.unrealized', DataType.DECIMAL)
162
+ .withField('additional.name', DataType.STRING)
163
+ .withField('additional.close', DataType.NUMBER)
164
+ .schema
165
+ );
166
+
126
167
  return PositionSummarySchema;
127
168
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "1.0.35",
3
+ "version": "1.0.36",
4
4
  "description": "Common classes used by the Portfolio system",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",