@barchart/portfolio-client-js 1.1.18 → 1.1.19
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/example/example.js +22 -4
- package/lib/gateway/PortfolioGateway.js +1 -3
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/example/example.js
CHANGED
|
@@ -365,7 +365,7 @@ module.exports = function () {
|
|
|
365
365
|
assert.argumentIsOptional(portfolio, 'portfolio', String);
|
|
366
366
|
assert.argumentIsOptional(position, 'position', String);
|
|
367
367
|
|
|
368
|
-
return Gateway.invoke(_this7._readPositionsEndpoint, { portfolio: portfolio, position: position || '*' });
|
|
368
|
+
return Gateway.invoke(_this7._readPositionsEndpoint, { portfolio: portfolio || '*', position: position || '*' });
|
|
369
369
|
});
|
|
370
370
|
}
|
|
371
371
|
|
|
@@ -414,8 +414,6 @@ module.exports = function () {
|
|
|
414
414
|
query.periods = periods;
|
|
415
415
|
}
|
|
416
416
|
|
|
417
|
-
console.log(query);
|
|
418
|
-
|
|
419
417
|
return Gateway.invoke(_this8._readPositionSummariesEndpoint, query);
|
|
420
418
|
});
|
|
421
419
|
}
|
|
@@ -997,7 +995,7 @@ module.exports = function () {
|
|
|
997
995
|
return {
|
|
998
996
|
JwtGateway: JwtGateway,
|
|
999
997
|
PortfolioGateway: PortfolioGateway,
|
|
1000
|
-
version: '1.1.
|
|
998
|
+
version: '1.1.19'
|
|
1001
999
|
};
|
|
1002
1000
|
}();
|
|
1003
1001
|
|
|
@@ -6391,6 +6389,26 @@ module.exports = function () {
|
|
|
6391
6389
|
},
|
|
6392
6390
|
|
|
6393
6391
|
|
|
6392
|
+
/**
|
|
6393
|
+
* Returns a new array containing all but the first item.
|
|
6394
|
+
*
|
|
6395
|
+
* @static
|
|
6396
|
+
* @param {Array} a
|
|
6397
|
+
* @returns {Array}
|
|
6398
|
+
*/
|
|
6399
|
+
dropLeft: function dropLeft(a) {
|
|
6400
|
+
assert.argumentIsArray(a, 'a');
|
|
6401
|
+
|
|
6402
|
+
var returnRef = Array.from(a);
|
|
6403
|
+
|
|
6404
|
+
if (returnRef.length !== 0) {
|
|
6405
|
+
returnRef.shift();
|
|
6406
|
+
}
|
|
6407
|
+
|
|
6408
|
+
return returnRef;
|
|
6409
|
+
},
|
|
6410
|
+
|
|
6411
|
+
|
|
6394
6412
|
/**
|
|
6395
6413
|
* Returns a new array containing all but the last item.
|
|
6396
6414
|
*
|
|
@@ -357,7 +357,7 @@ module.exports = (() => {
|
|
|
357
357
|
assert.argumentIsOptional(portfolio, 'portfolio', String);
|
|
358
358
|
assert.argumentIsOptional(position, 'position', String);
|
|
359
359
|
|
|
360
|
-
return Gateway.invoke(this._readPositionsEndpoint, { portfolio: portfolio, position: position || '*' });
|
|
360
|
+
return Gateway.invoke(this._readPositionsEndpoint, { portfolio: portfolio || '*', position: position || '*' });
|
|
361
361
|
});
|
|
362
362
|
}
|
|
363
363
|
|
|
@@ -402,8 +402,6 @@ module.exports = (() => {
|
|
|
402
402
|
query.periods = periods;
|
|
403
403
|
}
|
|
404
404
|
|
|
405
|
-
console.log(query);
|
|
406
|
-
|
|
407
405
|
return Gateway.invoke(this._readPositionSummariesEndpoint, query);
|
|
408
406
|
});
|
|
409
407
|
}
|
package/lib/index.js
CHANGED