@barchart/portfolio-api-common 1.13.0 → 1.14.0
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.
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/barchart/portfolio-api-common)
|
|
4
4
|
|
|
5
|
-
A *public* library of shared JavaScript code used by Barchart's
|
|
5
|
+
A *public* library of shared JavaScript code used by Barchart's paper-trading portfolio system.
|
|
6
6
|
|
|
7
7
|
### Overview
|
|
8
8
|
|
|
@@ -25,9 +25,8 @@ For reporting and display purposes, positions can be grouped together (by asset
|
|
|
25
25
|
|
|
26
26
|
### Package Managers
|
|
27
27
|
|
|
28
|
-
This library has been published as a *
|
|
28
|
+
This library has been published as a *public* module to NPM as [@barchart/portfolio-api-common](https://www.npmjs.com/package/@barchart/portfolio-api-common).
|
|
29
29
|
|
|
30
30
|
```shell
|
|
31
|
-
npm login
|
|
32
31
|
npm install @barchart/portfolio-api-common -S
|
|
33
32
|
```
|
|
@@ -361,22 +361,5 @@ module.exports = (() => {
|
|
|
361
361
|
.schema
|
|
362
362
|
);
|
|
363
363
|
|
|
364
|
-
const map = { };
|
|
365
|
-
|
|
366
|
-
function addSchemaToMap(type, schema) {
|
|
367
|
-
map[type.code] = schema;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
addSchemaToMap(TransactionType.BUY, buy);
|
|
371
|
-
addSchemaToMap(TransactionType.SELL, sell);
|
|
372
|
-
addSchemaToMap(TransactionType.BUY_SHORT, buyShort);
|
|
373
|
-
addSchemaToMap(TransactionType.SELL_SHORT, sellShort);
|
|
374
|
-
addSchemaToMap(TransactionType.FEE, fee);
|
|
375
|
-
addSchemaToMap(TransactionType.DEPOSIT, deposit);
|
|
376
|
-
addSchemaToMap(TransactionType.WITHDRAWAL, withdrawal);
|
|
377
|
-
addSchemaToMap(TransactionType.VALUATION, valuation);
|
|
378
|
-
addSchemaToMap(TransactionType.DELIST, delist);
|
|
379
|
-
addSchemaToMap(TransactionType.INCOME, income);
|
|
380
|
-
|
|
381
364
|
return TransactionSchema;
|
|
382
365
|
})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@barchart/portfolio-api-common",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "Common JavaScript code used by Barchart's Portfolio Service",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Bryan Ingle",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"url": "git+ssh://git@github.com/barchart/portfolio-api-common.git"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@barchart/common-js": "^4.
|
|
18
|
+
"@barchart/common-js": "^4.22.0",
|
|
19
19
|
"uuid": "^8.3.2"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|