@barchart/portfolio-client-js 10.0.1 → 10.1.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/lib/gateway/PortfolioGateway.js +5 -2
- package/lib/index.js +1 -1
- package/package.json +1 -1
|
@@ -1412,13 +1412,16 @@ module.exports = (() => {
|
|
|
1412
1412
|
* @param {String} connection - The SnapTrade identifier for the brokerage connection.
|
|
1413
1413
|
* @param {String} account - The SnapTrade identifier for the brokerage account.
|
|
1414
1414
|
* @param {SnapTradeLinkStatusCallback} callback
|
|
1415
|
+
* @param {Number=} interval - The polling interval, in milliseconds. Default is 2500 ms.
|
|
1415
1416
|
* @returns {Disposable}
|
|
1416
1417
|
*/
|
|
1417
|
-
subscribeSnapTradeAccountLink(connection, account, callback) {
|
|
1418
|
+
subscribeSnapTradeAccountLink(connection, account, callback, interval = 2500) {
|
|
1418
1419
|
checkStart.call(this);
|
|
1419
1420
|
|
|
1420
1421
|
assert.argumentIsRequired(connection, 'connection', String);
|
|
1421
1422
|
assert.argumentIsRequired(account, 'account', String);
|
|
1423
|
+
assert.argumentIsRequired(callback, 'callback', Function);
|
|
1424
|
+
assert.argumentIsOptional(interval, 'interval', Number);
|
|
1422
1425
|
|
|
1423
1426
|
let disposable;
|
|
1424
1427
|
|
|
@@ -1436,7 +1439,7 @@ module.exports = (() => {
|
|
|
1436
1439
|
}
|
|
1437
1440
|
};
|
|
1438
1441
|
|
|
1439
|
-
const token = setInterval(poll,
|
|
1442
|
+
const token = setInterval(poll, interval);
|
|
1440
1443
|
|
|
1441
1444
|
disposable = Disposable.fromAction(() => {
|
|
1442
1445
|
clearInterval(token);
|
package/lib/index.js
CHANGED