@barchart/portfolio-api-common 1.3.12 → 1.3.13
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.
|
@@ -200,7 +200,7 @@ module.exports = (() => {
|
|
|
200
200
|
|
|
201
201
|
if (t.dividend) {
|
|
202
202
|
if (t.dividend.numerator && t.dividend.denominator) {
|
|
203
|
-
f.rate =
|
|
203
|
+
f.rate = t.dividend.numerator.divide(t.dividend.denominator);
|
|
204
204
|
} else if (t.dividend.rate) {
|
|
205
205
|
f.rate = t.dividend.rate;
|
|
206
206
|
}
|
|
@@ -222,7 +222,7 @@ module.exports = (() => {
|
|
|
222
222
|
|
|
223
223
|
if (t.dividend) {
|
|
224
224
|
if (t.dividend.numerator && t.dividend.denominator) {
|
|
225
|
-
f.rate =
|
|
225
|
+
f.rate = t.dividend.numerator.divide(t.dividend.denominator);
|
|
226
226
|
} else if (t.dividend.rate) {
|
|
227
227
|
f.rate = t.dividend.rate;
|
|
228
228
|
}
|
|
@@ -251,7 +251,7 @@ module.exports = (() => {
|
|
|
251
251
|
const splitFormatter = (t, f) => {
|
|
252
252
|
f.boughtSold = t.quantity;
|
|
253
253
|
|
|
254
|
-
f.rate =
|
|
254
|
+
f.rate = t.split.numerator.divide(t.split.denominator);
|
|
255
255
|
|
|
256
256
|
f.shares = t.snapshot.open.subtract(t.quantity);
|
|
257
257
|
};
|