@barchart/portfolio-api-common 1.2.104 → 1.2.105

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.
@@ -498,6 +498,18 @@ module.exports = (() => {
498
498
  }
499
499
  }
500
500
 
501
+ /**
502
+ * Sets a historical forex quote.
503
+ *
504
+ * @public
505
+ * @param {Object} forexQuote
506
+ * @param {Day} date
507
+ */
508
+ setHistoricalForexQuote(forexQuote, date) {
509
+ assert.argumentIsRequired(forexQuote, 'forexQuote', Object);
510
+ assert.argumentIsRequired(date, 'date', Day, 'Day');
511
+ }
512
+
501
513
  /**
502
514
  * Returns all forex symbols that are required to do currency translations.
503
515
  *
@@ -556,7 +556,7 @@ module.exports = (() => {
556
556
  if (currentSummary) {
557
557
  const period = currentSummary.period;
558
558
 
559
- returnRef = period.unrealized;
559
+ returnRef = period.realized;
560
560
  } else {
561
561
  returnRef = Decimal.ZERO;
562
562
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "1.2.104",
3
+ "version": "1.2.105",
4
4
  "description": "Common classes used by the Portfolio system",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",
@@ -1922,6 +1922,18 @@ module.exports = (() => {
1922
1922
  }
1923
1923
  }
1924
1924
 
1925
+ /**
1926
+ * Sets a historical forex quote.
1927
+ *
1928
+ * @public
1929
+ * @param {Object} forexQuote
1930
+ * @param {Day} date
1931
+ */
1932
+ setHistoricalForexQuote(forexQuote, date) {
1933
+ assert.argumentIsRequired(forexQuote, 'forexQuote', Object);
1934
+ assert.argumentIsRequired(date, 'date', Day, 'Day');
1935
+ }
1936
+
1925
1937
  /**
1926
1938
  * Returns all forex symbols that are required to do currency translations.
1927
1939
  *
@@ -3931,7 +3943,7 @@ module.exports = (() => {
3931
3943
  if (currentSummary) {
3932
3944
  const period = currentSummary.period;
3933
3945
 
3934
- returnRef = period.unrealized;
3946
+ returnRef = period.realized;
3935
3947
  } else {
3936
3948
  returnRef = Decimal.ZERO;
3937
3949
  }