@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
|
*
|
package/package.json
CHANGED
package/test/SpecRunner.js
CHANGED
|
@@ -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.
|
|
3946
|
+
returnRef = period.realized;
|
|
3935
3947
|
} else {
|
|
3936
3948
|
returnRef = Decimal.ZERO;
|
|
3937
3949
|
}
|