@stoqey/ib 1.3.7 → 1.3.9
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/dist/api/api.d.ts +4 -4
- package/dist/api/api.js +6 -6
- package/dist/api/api.js.map +1 -1
- package/dist/api/contract/forex.js.map +1 -1
- package/dist/api/data/enum/duration-unit.js +1 -1
- package/dist/api/data/enum/duration-unit.js.map +1 -1
- package/dist/api/data/enum/event-name.js +1 -1
- package/dist/api/data/enum/event-name.js.map +1 -1
- package/dist/api/data/enum/fad-data-type.js +1 -1
- package/dist/api/data/enum/fad-data-type.js.map +1 -1
- package/dist/api/data/enum/log-level.js +1 -1
- package/dist/api/data/enum/log-level.js.map +1 -1
- package/dist/api/data/enum/min-server-version.js +1 -1
- package/dist/api/data/enum/min-server-version.js.map +1 -1
- package/dist/api/data/enum/option-exercise-action.js +1 -1
- package/dist/api/data/enum/option-exercise-action.js.map +1 -1
- package/dist/api/data/enum/option-type.js +1 -1
- package/dist/api/data/enum/option-type.js.map +1 -1
- package/dist/api/data/enum/sec-type.js +1 -1
- package/dist/api/data/enum/sec-type.js.map +1 -1
- package/dist/api/historical/bar-size-setting.js +1 -1
- package/dist/api/historical/bar-size-setting.js.map +1 -1
- package/dist/api/market/scannerSubscription.d.ts +4 -3
- package/dist/api/market/tickByTickDataType.js +1 -1
- package/dist/api/market/tickByTickDataType.js.map +1 -1
- package/dist/api/market/tickType.js +1 -1
- package/dist/api/market/tickType.js.map +1 -1
- package/dist/api/order/enum/conjunction-connection.js +1 -1
- package/dist/api/order/enum/conjunction-connection.js.map +1 -1
- package/dist/api/order/enum/order-action.js +1 -1
- package/dist/api/order/enum/order-action.js.map +1 -1
- package/dist/api/order/enum/order-condition-type.js +1 -1
- package/dist/api/order/enum/order-condition-type.js.map +1 -1
- package/dist/api/order/enum/order-status.js +1 -1
- package/dist/api/order/enum/order-status.js.map +1 -1
- package/dist/api/order/enum/orderType.js +1 -1
- package/dist/api/order/enum/orderType.js.map +1 -1
- package/dist/api/order/enum/trigger-method.js +1 -1
- package/dist/api/order/enum/trigger-method.js.map +1 -1
- package/dist/api-next/api-next.d.ts +48 -5
- package/dist/api-next/api-next.js +186 -26
- package/dist/api-next/api-next.js.map +1 -1
- package/dist/api-next/common/connection-state.js +1 -1
- package/dist/api-next/common/connection-state.js.map +1 -1
- package/dist/api-next/market/market-data-type.js +1 -1
- package/dist/api-next/market/market-data-type.js.map +1 -1
- package/dist/api-next/market/tick-type.js +1 -1
- package/dist/api-next/market/tick-type.js.map +1 -1
- package/dist/api-next/market-scanner/market-scanner.d.ts +224 -0
- package/dist/api-next/market-scanner/market-scanner.js +218 -0
- package/dist/api-next/market-scanner/market-scanner.js.map +1 -0
- package/dist/common/errorCode.js +1 -1
- package/dist/common/errorCode.js.map +1 -1
- package/dist/core/api-next/auto-connection.js +1 -1
- package/dist/core/api-next/auto-connection.js.map +1 -1
- package/dist/core/api-next/item-list-update.js.map +1 -1
- package/dist/core/api-next/subscription.d.ts +6 -2
- package/dist/core/api-next/subscription.js +12 -3
- package/dist/core/api-next/subscription.js.map +1 -1
- package/dist/core/io/controller.js +9 -0
- package/dist/core/io/controller.js.map +1 -1
- package/dist/core/io/decoder.js +3 -3
- package/dist/core/io/decoder.js.map +1 -1
- package/dist/core/io/encoder.d.ts +2 -2
- package/dist/core/io/encoder.js +13 -15
- package/dist/core/io/encoder.js.map +1 -1
- package/dist/core/io/enum/in-msg-id.js +1 -1
- package/dist/core/io/enum/in-msg-id.js.map +1 -1
- package/dist/core/io/socket.d.ts +4 -0
- package/dist/core/io/socket.js +5 -5
- package/dist/core/io/socket.js.map +1 -1
- package/dist/tests/unit/api/matching-symbols.test.d.ts +1 -0
- package/dist/tests/unit/api/matching-symbols.test.js +75 -0
- package/dist/tests/unit/api/matching-symbols.test.js.map +1 -0
- package/dist/tests/unit/api/order/placeOrder.test.js +50 -27
- package/dist/tests/unit/api/order/placeOrder.test.js.map +1 -1
- package/dist/tests/unit/api/order/reqAllOpenOrders.test.js +19 -21
- package/dist/tests/unit/api/order/reqAllOpenOrders.test.js.map +1 -1
- package/dist/tests/unit/api-next/get-account-summary.test.js +17 -6
- package/dist/tests/unit/api-next/get-account-summary.test.js.map +1 -1
- package/dist/tests/unit/api-next/get-positions.test.js +3 -0
- package/dist/tests/unit/api-next/get-positions.test.js.map +1 -1
- package/dist/tools/account-summary.js +1 -8
- package/dist/tools/account-summary.js.map +1 -1
- package/dist/tools/commission-reports.d.ts +3 -0
- package/dist/tools/commission-reports.js +3 -12
- package/dist/tools/commission-reports.js.map +1 -1
- package/dist/tools/common/ib-api-next-app.d.ts +19 -2
- package/dist/tools/common/ib-api-next-app.js +70 -28
- package/dist/tools/common/ib-api-next-app.js.map +1 -1
- package/dist/tools/contract-details.js +2 -9
- package/dist/tools/contract-details.js.map +1 -1
- package/dist/tools/current-time.js +1 -8
- package/dist/tools/current-time.js.map +1 -1
- package/dist/tools/execution-details.d.ts +3 -0
- package/dist/tools/execution-details.js +3 -12
- package/dist/tools/execution-details.js.map +1 -1
- package/dist/tools/get-head-timestamp.js +9 -10
- package/dist/tools/get-head-timestamp.js.map +1 -1
- package/dist/tools/histogram-data.d.ts +3 -0
- package/dist/tools/histogram-data.js +4 -8
- package/dist/tools/histogram-data.js.map +1 -1
- package/dist/tools/historical-data-updates.js +1 -11
- package/dist/tools/historical-data-updates.js.map +1 -1
- package/dist/tools/historical-data.d.ts +3 -0
- package/dist/tools/historical-data.js +2 -9
- package/dist/tools/historical-data.js.map +1 -1
- package/dist/tools/historical-ticks-bid-ask.js +1 -8
- package/dist/tools/historical-ticks-bid-ask.js.map +1 -1
- package/dist/tools/historical-ticks-last.js +1 -8
- package/dist/tools/historical-ticks-last.js.map +1 -1
- package/dist/tools/historical-ticks-mid.js +1 -8
- package/dist/tools/historical-ticks-mid.js.map +1 -1
- package/dist/tools/managed-accts.js +1 -8
- package/dist/tools/managed-accts.js.map +1 -1
- package/dist/tools/market-data-snapshot.js +4 -11
- package/dist/tools/market-data-snapshot.js.map +1 -1
- package/dist/tools/market-data.js +2 -10
- package/dist/tools/market-data.js.map +1 -1
- package/dist/tools/market-depth-exchanges.js +1 -8
- package/dist/tools/market-depth-exchanges.js.map +1 -1
- package/dist/tools/market-depth.js +1 -8
- package/dist/tools/market-depth.js.map +1 -1
- package/dist/tools/market-scanner.d.ts +1 -0
- package/dist/tools/market-scanner.js +58 -0
- package/dist/tools/market-scanner.js.map +1 -0
- package/dist/tools/modify-order.js +1 -6
- package/dist/tools/modify-order.js.map +1 -1
- package/dist/tools/next-valid-order-id.js +1 -8
- package/dist/tools/next-valid-order-id.js.map +1 -1
- package/dist/tools/open-orders-auto.js +3 -13
- package/dist/tools/open-orders-auto.js.map +1 -1
- package/dist/tools/open-orders.js +2 -11
- package/dist/tools/open-orders.js.map +1 -1
- package/dist/tools/place-new-order.js +1 -6
- package/dist/tools/place-new-order.js.map +1 -1
- package/dist/tools/place-order.js +1 -2
- package/dist/tools/place-order.js.map +1 -1
- package/dist/tools/pnl-single.js +1 -16
- package/dist/tools/pnl-single.js.map +1 -1
- package/dist/tools/pnl.js +1 -16
- package/dist/tools/pnl.js.map +1 -1
- package/dist/tools/positions.js +2 -15
- package/dist/tools/positions.js.map +1 -1
- package/dist/tools/search-contracts.js +1 -8
- package/dist/tools/search-contracts.js.map +1 -1
- package/dist/tools/sec-def-opt-params.js +6 -10
- package/dist/tools/sec-def-opt-params.js.map +1 -1
- package/dist/tools/user-info.js +1 -8
- package/dist/tools/user-info.js.map +1 -1
- package/package.json +9 -9
package/dist/tools/pnl-single.js
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
/**
|
|
7
|
-
* This App will print real time updates for daily PnL of individual positions.
|
|
8
|
-
*/
|
|
9
|
-
const path_1 = __importDefault(require("path"));
|
|
10
|
-
const logger_1 = __importDefault(require("../common/logger"));
|
|
11
3
|
const ib_api_next_app_1 = require("./common/ib-api-next-app");
|
|
12
4
|
/////////////////////////////////////////////////////////////////////////////////
|
|
13
5
|
// The help text //
|
|
@@ -21,11 +13,6 @@ const OPTION_ARGUMENTS = [
|
|
|
21
13
|
"(required) Contract ID (conId) of contract to receive daily PnL updates for.",
|
|
22
14
|
],
|
|
23
15
|
["model=<code>", "Model in which position exists."],
|
|
24
|
-
[
|
|
25
|
-
"watch",
|
|
26
|
-
"Watch for changes. If specified, the app will keep running and print PnL updates to console as received from TWS. " +
|
|
27
|
-
"If not specified, the app will print a one-time snapshot and than exit.",
|
|
28
|
-
],
|
|
29
16
|
];
|
|
30
17
|
const EXAMPLE_TEXT = "pnl-single.js -account=DU1234567 -conid=1234567 -watch";
|
|
31
18
|
//////////////////////////////////////////////////////////////////////////////
|
|
@@ -39,15 +26,13 @@ class PrintPositionsApp extends ib_api_next_app_1.IBApiNextApp {
|
|
|
39
26
|
* Start the app.
|
|
40
27
|
*/
|
|
41
28
|
start() {
|
|
42
|
-
|
|
43
|
-
logger_1.default.debug(`Starting ${scriptName} script`);
|
|
29
|
+
super.start();
|
|
44
30
|
if (!this.cmdLineArgs.account) {
|
|
45
31
|
this.error("-account argument missing.");
|
|
46
32
|
}
|
|
47
33
|
if (!this.cmdLineArgs.conid) {
|
|
48
34
|
this.error("-conid argument missing.");
|
|
49
35
|
}
|
|
50
|
-
this.connect(this.cmdLineArgs.watch ? 10000 : 0);
|
|
51
36
|
this.subscription$ = this.api
|
|
52
37
|
.getPnLSingle(this.cmdLineArgs.account, this.cmdLineArgs.model, this.cmdLineArgs.conid)
|
|
53
38
|
.subscribe({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pnl-single.js","sourceRoot":"","sources":["../../src/tools/pnl-single.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pnl-single.js","sourceRoot":"","sources":["../../src/tools/pnl-single.ts"],"names":[],"mappings":";;AAMA,8DAAwD;AAExD,iFAAiF;AACjF,iFAAiF;AACjF,iFAAiF;AAEjF,MAAM,gBAAgB,GACpB,iEAAiE,CAAC;AACpE,MAAM,UAAU,GAAG,gCAAgC,CAAC;AACpD,MAAM,gBAAgB,GAAuB;IAC3C,CAAC,sBAAsB,EAAE,8CAA8C,CAAC;IACxE;QACE,gBAAgB;QAChB,8EAA8E;KAC/E;IACD,CAAC,cAAc,EAAE,iCAAiC,CAAC;CACpD,CAAC;AACF,MAAM,YAAY,GAAG,wDAAwD,CAAC;AAE9E,8EAA8E;AAC9E,8EAA8E;AAC9E,8EAA8E;AAE9E,MAAM,iBAAkB,SAAQ,8BAAY;IAC1C;QACE,KAAK,CAAC,gBAAgB,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC;IACtE,CAAC;IAKD;;OAEG;IACH,KAAK;QACH,KAAK,CAAC,KAAK,EAAE,CAAC;QAEd,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE;YAC7B,IAAI,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;SAC1C;QACD,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;YAC3B,IAAI,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;SACxC;QAED,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,GAAG;aAC1B,YAAY,CACX,IAAI,CAAC,WAAW,CAAC,OAAiB,EAClC,IAAI,CAAC,WAAW,CAAC,KAAe,EAChC,IAAI,CAAC,WAAW,CAAC,KAAe,CACjC;aACA,SAAS,CAAC;YACT,IAAI,EAAE,CAAC,SAAS,EAAE,EAAE;gBAClB,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;gBAC5B,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;oBAC3B,IAAI,CAAC,IAAI,EAAE,CAAC;iBACb;YACH,CAAC;YACD,KAAK,EAAE,CAAC,GAAmB,EAAE,EAAE;gBAC7B,IAAI,CAAC,KAAK,CAAC,6BAA6B,GAAG,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC;YAChE,CAAC;SACF,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACH,IAAI;QACF,IAAI,CAAC,aAAa,EAAE,WAAW,EAAE,CAAC;QAClC,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;CACF;AAED,cAAc;AAEd,IAAI,iBAAiB,EAAE,CAAC,KAAK,EAAE,CAAC"}
|
package/dist/tools/pnl.js
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
/**
|
|
7
|
-
* This App will print daily PnL and unrealized PnL for a given account id.
|
|
8
|
-
*/
|
|
9
|
-
const path_1 = __importDefault(require("path"));
|
|
10
|
-
const logger_1 = __importDefault(require("../common/logger"));
|
|
11
3
|
const ib_api_next_app_1 = require("./common/ib-api-next-app");
|
|
12
4
|
/////////////////////////////////////////////////////////////////////////////////
|
|
13
5
|
// The help text //
|
|
@@ -16,11 +8,6 @@ const DESCRIPTION_TEXT = "Print daily PnL and unrealized PnL for a given account
|
|
|
16
8
|
const USAGE_TEXT = "Usage: pnl.js <options>";
|
|
17
9
|
const OPTION_ARGUMENTS = [
|
|
18
10
|
["account", "(required) The IBKR account id."],
|
|
19
|
-
[
|
|
20
|
-
"watch",
|
|
21
|
-
"Watch for changes. If specified, the app will keep running and print PnL updates to console as received from TWS. " +
|
|
22
|
-
"If not specified, the app will print a one-time snapshot and than exit.",
|
|
23
|
-
],
|
|
24
11
|
];
|
|
25
12
|
const EXAMPLE_TEXT = "pnl.js -account=DU1234567 -watch";
|
|
26
13
|
//////////////////////////////////////////////////////////////////////////////
|
|
@@ -34,12 +21,10 @@ class PrintPositionsApp extends ib_api_next_app_1.IBApiNextApp {
|
|
|
34
21
|
* Start the app.
|
|
35
22
|
*/
|
|
36
23
|
start() {
|
|
37
|
-
|
|
38
|
-
logger_1.default.info(`Starting ${scriptName} script`);
|
|
24
|
+
super.start();
|
|
39
25
|
if (!this.cmdLineArgs.account) {
|
|
40
26
|
this.error("-account argument missing.");
|
|
41
27
|
}
|
|
42
|
-
this.connect(this.cmdLineArgs.watch ? 10000 : 0);
|
|
43
28
|
this.subscription$ = this.api
|
|
44
29
|
.getPnL(this.cmdLineArgs.account, this.cmdLineArgs.model)
|
|
45
30
|
.subscribe({
|
package/dist/tools/pnl.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pnl.js","sourceRoot":"","sources":["../../src/tools/pnl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pnl.js","sourceRoot":"","sources":["../../src/tools/pnl.ts"],"names":[],"mappings":";;AAMA,8DAAwD;AAExD,iFAAiF;AACjF,iFAAiF;AACjF,iFAAiF;AAEjF,MAAM,gBAAgB,GACpB,4DAA4D,CAAC;AAC/D,MAAM,UAAU,GAAG,yBAAyB,CAAC;AAC7C,MAAM,gBAAgB,GAAuB;IAC3C,CAAC,SAAS,EAAE,iCAAiC,CAAC;CAC/C,CAAC;AACF,MAAM,YAAY,GAAG,kCAAkC,CAAC;AAExD,8EAA8E;AAC9E,8EAA8E;AAC9E,8EAA8E;AAE9E,MAAM,iBAAkB,SAAQ,8BAAY;IAC1C;QACE,KAAK,CAAC,gBAAgB,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC;IACtE,CAAC;IAKD;;OAEG;IACH,KAAK;QACH,KAAK,CAAC,KAAK,EAAE,CAAC;QAEd,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE;YAC7B,IAAI,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;SAC1C;QAED,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,GAAG;aAC1B,MAAM,CACL,IAAI,CAAC,WAAW,CAAC,OAAiB,EAClC,IAAI,CAAC,WAAW,CAAC,KAAe,CACjC;aACA,SAAS,CAAC;YACT,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE;gBACZ,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;gBACtB,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;oBAC3B,IAAI,CAAC,IAAI,EAAE,CAAC;iBACb;YACH,CAAC;YACD,KAAK,EAAE,CAAC,GAAmB,EAAE,EAAE;gBAC7B,IAAI,CAAC,KAAK,CAAC,uBAAuB,GAAG,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC;YAC1D,CAAC;SACF,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACH,IAAI;QACF,IAAI,CAAC,aAAa,EAAE,WAAW,EAAE,CAAC;QAClC,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;CACF;AAED,cAAc;AAEd,IAAI,iBAAiB,EAAE,CAAC,KAAK,EAAE,CAAC"}
|
package/dist/tools/positions.js
CHANGED
|
@@ -2,25 +2,14 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This App will print all positions on your IBKR accounts to console.
|
|
4
4
|
*/
|
|
5
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
-
};
|
|
8
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
const path_1 = __importDefault(require("path"));
|
|
10
|
-
const logger_1 = __importDefault(require("../common/logger"));
|
|
11
6
|
const ib_api_next_app_1 = require("./common/ib-api-next-app");
|
|
12
7
|
/////////////////////////////////////////////////////////////////////////////////
|
|
13
8
|
// The help text //
|
|
14
9
|
/////////////////////////////////////////////////////////////////////////////////
|
|
15
10
|
const DESCRIPTION_TEXT = "Prints all positions on your IBKR accounts to console.";
|
|
16
11
|
const USAGE_TEXT = "Usage: positions.js <options>";
|
|
17
|
-
const OPTION_ARGUMENTS = [
|
|
18
|
-
[
|
|
19
|
-
"watch",
|
|
20
|
-
"Watch for changes. If specified, the app will keep running and print positions updates to console as received from TWS. " +
|
|
21
|
-
"If not specified, the app will print a one-time snapshot and than exit.",
|
|
22
|
-
],
|
|
23
|
-
];
|
|
12
|
+
const OPTION_ARGUMENTS = [];
|
|
24
13
|
const EXAMPLE_TEXT = "positions.js -watch";
|
|
25
14
|
//////////////////////////////////////////////////////////////////////////////
|
|
26
15
|
// The App code //
|
|
@@ -33,9 +22,7 @@ class PrintPositionsApp extends ib_api_next_app_1.IBApiNextApp {
|
|
|
33
22
|
* Start the app.
|
|
34
23
|
*/
|
|
35
24
|
start() {
|
|
36
|
-
|
|
37
|
-
logger_1.default.debug(`Starting ${scriptName} script`);
|
|
38
|
-
this.connect(this.cmdLineArgs.watch ? 10000 : 0);
|
|
25
|
+
super.start();
|
|
39
26
|
this.subscription$ = this.api.getPositions().subscribe({
|
|
40
27
|
next: (positions) => {
|
|
41
28
|
this.printObject(positions);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"positions.js","sourceRoot":"","sources":["../../src/tools/positions.ts"],"names":[],"mappings":";AAAA;;GAEG
|
|
1
|
+
{"version":3,"file":"positions.js","sourceRoot":"","sources":["../../src/tools/positions.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAKH,8DAAwD;AAExD,iFAAiF;AACjF,iFAAiF;AACjF,iFAAiF;AAEjF,MAAM,gBAAgB,GACpB,wDAAwD,CAAC;AAC3D,MAAM,UAAU,GAAG,+BAA+B,CAAC;AACnD,MAAM,gBAAgB,GAAuB,EAAE,CAAC;AAChD,MAAM,YAAY,GAAG,qBAAqB,CAAC;AAE3C,8EAA8E;AAC9E,8EAA8E;AAC9E,8EAA8E;AAE9E,MAAM,iBAAkB,SAAQ,8BAAY;IAC1C;QACE,KAAK,CAAC,gBAAgB,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC;IACtE,CAAC;IAKD;;OAEG;IACH,KAAK;QACH,KAAK,CAAC,KAAK,EAAE,CAAC;QAEd,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,SAAS,CAAC;YACrD,IAAI,EAAE,CAAC,SAAS,EAAE,EAAE;gBAClB,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;gBAC5B,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;oBAC3B,IAAI,CAAC,IAAI,EAAE,CAAC;iBACb;YACH,CAAC;YACD,KAAK,EAAE,CAAC,GAAmB,EAAE,EAAE;gBAC7B,IAAI,CAAC,KAAK,CAAC,6BAA6B,GAAG,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC;YAChE,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,IAAI;QACF,IAAI,CAAC,aAAa,EAAE,WAAW,EAAE,CAAC;QAClC,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;CACF;AAED,cAAc;AAEd,IAAI,iBAAiB,EAAE,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -3,12 +3,7 @@
|
|
|
3
3
|
* This App will search contracts matching a given text pattern and print it
|
|
4
4
|
* to console.
|
|
5
5
|
*/
|
|
6
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
-
};
|
|
9
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
const path_1 = __importDefault(require("path"));
|
|
11
|
-
const logger_1 = __importDefault(require("../common/logger"));
|
|
12
7
|
const ib_api_next_app_1 = require("./common/ib-api-next-app");
|
|
13
8
|
///////////////////////////////////////////////////////////////////////////////
|
|
14
9
|
// The help text //
|
|
@@ -30,12 +25,10 @@ class PrintContractSearchApp extends ib_api_next_app_1.IBApiNextApp {
|
|
|
30
25
|
* Start the app.
|
|
31
26
|
*/
|
|
32
27
|
start() {
|
|
33
|
-
|
|
34
|
-
logger_1.default.debug(`Starting ${scriptName} script`);
|
|
28
|
+
super.start();
|
|
35
29
|
if (!this.cmdLineArgs.pattern) {
|
|
36
30
|
this.error("-pattern argument missing.");
|
|
37
31
|
}
|
|
38
|
-
this.connect();
|
|
39
32
|
this.api
|
|
40
33
|
.searchContracts(this.cmdLineArgs.pattern)
|
|
41
34
|
.then((searchResult) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-contracts.js","sourceRoot":"","sources":["../../src/tools/search-contracts.ts"],"names":[],"mappings":";AAAA;;;GAGG
|
|
1
|
+
{"version":3,"file":"search-contracts.js","sourceRoot":"","sources":["../../src/tools/search-contracts.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAGH,8DAAwD;AAExD,+EAA+E;AAC/E,+EAA+E;AAC/E,+EAA+E;AAE/E,MAAM,gBAAgB,GAAG,iDAAiD,CAAC;AAC3E,MAAM,UAAU,GAAG,qCAAqC,CAAC;AACzD,MAAM,gBAAgB,GAAuB;IAC3C,CAAC,gBAAgB,EAAE,+BAA+B,CAAC;CACpD,CAAC;AACF,MAAM,YAAY,GAAG,gCAAgC,CAAC;AAEtD,8EAA8E;AAC9E,8EAA8E;AAC9E,8EAA8E;AAE9E,MAAM,sBAAuB,SAAQ,8BAAY;IAC/C;QACE,KAAK,CAAC,gBAAgB,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,KAAK;QACH,KAAK,CAAC,KAAK,EAAE,CAAC;QAEd,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE;YAC7B,IAAI,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;SAC1C;QAED,IAAI,CAAC,GAAG;aACL,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,OAAiB,CAAC;aACnD,IAAI,CAAC,CAAC,YAAY,EAAE,EAAE;YACrB,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;YAC/B,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,GAAmB,EAAE,EAAE;YAC7B,IAAI,CAAC,KAAK,CAAC,gCAAgC,GAAG,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC;QACnE,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACH,IAAI;QACF,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;CACF;AAED,cAAc;AAEd,IAAI,sBAAsB,EAAE,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -2,12 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This App will request security definition option parameters from TWS and print it to console.
|
|
4
4
|
*/
|
|
5
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
-
};
|
|
8
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
const path_1 = __importDefault(require("path"));
|
|
10
|
-
const logger_1 = __importDefault(require("../common/logger"));
|
|
11
6
|
const ib_api_next_app_1 = require("./common/ib-api-next-app");
|
|
12
7
|
/////////////////////////////////////////////////////////////////////////////////
|
|
13
8
|
// The help text //
|
|
@@ -17,8 +12,11 @@ const USAGE_TEXT = "Usage: sec-def-opt-params <options>";
|
|
|
17
12
|
const OPTION_ARGUMENTS = [
|
|
18
13
|
["conid=<number>", "Contract ID (conId) of the underlying contract."],
|
|
19
14
|
["symbol=<name>", "The underlying symbol name."],
|
|
20
|
-
["sectype=<type>", "The underlying security type. Valid values: STK or IND"
|
|
21
|
-
[
|
|
15
|
+
["sectype=<type>", "The underlying security type. Valid values: STK or IND"],
|
|
16
|
+
[
|
|
17
|
+
"exchange=<name>",
|
|
18
|
+
"The exchange on which the returned options are trading.",
|
|
19
|
+
],
|
|
22
20
|
];
|
|
23
21
|
const EXAMPLE_TEXT = "sec-def-opt-params -symbol=AAPL -sectype=STK -conid=265598";
|
|
24
22
|
//////////////////////////////////////////////////////////////////////////////
|
|
@@ -32,9 +30,7 @@ class PrintOptionsDetailsApp extends ib_api_next_app_1.IBApiNextApp {
|
|
|
32
30
|
* Start the app.
|
|
33
31
|
*/
|
|
34
32
|
start() {
|
|
35
|
-
|
|
36
|
-
logger_1.default.debug(`Starting ${scriptName} script`);
|
|
37
|
-
this.connect();
|
|
33
|
+
super.start();
|
|
38
34
|
this.api
|
|
39
35
|
.getSecDefOptParams(this.cmdLineArgs.symbol, this.cmdLineArgs.exchange, this.cmdLineArgs.sectype, this.cmdLineArgs.conid ?? undefined)
|
|
40
36
|
.then((details) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sec-def-opt-params.js","sourceRoot":"","sources":["../../src/tools/sec-def-opt-params.ts"],"names":[],"mappings":";AAAA;;GAEG
|
|
1
|
+
{"version":3,"file":"sec-def-opt-params.js","sourceRoot":"","sources":["../../src/tools/sec-def-opt-params.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAIH,8DAAwD;AAExD,iFAAiF;AACjF,iFAAiF;AACjF,iFAAiF;AAEjF,MAAM,gBAAgB,GACpB,mFAAmF,CAAC;AACtF,MAAM,UAAU,GAAG,qCAAqC,CAAC;AACzD,MAAM,gBAAgB,GAAuB;IAC3C,CAAC,gBAAgB,EAAE,iDAAiD,CAAC;IACrE,CAAC,eAAe,EAAE,6BAA6B,CAAC;IAChD,CAAC,gBAAgB,EAAE,wDAAwD,CAAC;IAC5E;QACE,iBAAiB;QACjB,yDAAyD;KAC1D;CACF,CAAC;AACF,MAAM,YAAY,GAChB,4DAA4D,CAAC;AAE/D,8EAA8E;AAC9E,8EAA8E;AAC9E,8EAA8E;AAE9E,MAAM,sBAAuB,SAAQ,8BAAY;IAC/C;QACE,KAAK,CAAC,gBAAgB,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,KAAK;QACH,KAAK,CAAC,KAAK,EAAE,CAAC;QAEd,IAAI,CAAC,GAAG;aACL,kBAAkB,CACjB,IAAI,CAAC,WAAW,CAAC,MAAgB,EACjC,IAAI,CAAC,WAAW,CAAC,QAAkB,EACnC,IAAI,CAAC,WAAW,CAAC,OAAkB,EAClC,IAAI,CAAC,WAAW,CAAC,KAAgB,IAAI,SAAS,CAChD;aACA,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE;YAChB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;YAC1B,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,GAAmB,EAAE,EAAE;YAC7B,IAAI,CAAC,KAAK,CAAC,mCAAmC,GAAG,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC;QACtE,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACH,IAAI;QACF,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;CACF;AAED,cAAc;AAEd,IAAI,sBAAsB,EAAE,CAAC,KAAK,EAAE,CAAC"}
|
package/dist/tools/user-info.js
CHANGED
|
@@ -2,12 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This App will print the user info of the logged user.
|
|
4
4
|
*/
|
|
5
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
-
};
|
|
8
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
const path_1 = __importDefault(require("path"));
|
|
10
|
-
const logger_1 = __importDefault(require("../common/logger"));
|
|
11
6
|
const ib_api_next_app_1 = require("./common/ib-api-next-app");
|
|
12
7
|
/////////////////////////////////////////////////////////////////////////////////
|
|
13
8
|
// The help text. //
|
|
@@ -27,9 +22,7 @@ class App extends ib_api_next_app_1.IBApiNextApp {
|
|
|
27
22
|
* Start the app.
|
|
28
23
|
*/
|
|
29
24
|
start() {
|
|
30
|
-
|
|
31
|
-
logger_1.default.debug(`Starting ${scriptName} script`);
|
|
32
|
-
this.connect(0);
|
|
25
|
+
super.start();
|
|
33
26
|
this.api
|
|
34
27
|
.getUserInfo()
|
|
35
28
|
.then((whiteBrandingId) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-info.js","sourceRoot":"","sources":["../../src/tools/user-info.ts"],"names":[],"mappings":";AAAA;;GAEG
|
|
1
|
+
{"version":3,"file":"user-info.js","sourceRoot":"","sources":["../../src/tools/user-info.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAGH,8DAAwD;AAExD,iFAAiF;AACjF,iFAAiF;AACjF,iFAAiF;AAEjF,MAAM,gBAAgB,GAAG,0CAA0C,CAAC;AACpE,MAAM,UAAU,GAAG,+BAA+B,CAAC;AACnD,MAAM,gBAAgB,GAAuB,EAAE,CAAC;AAChD,MAAM,YAAY,GAAG,yBAAyB,CAAC;AAE/C,8EAA8E;AAC9E,8EAA8E;AAC9E,8EAA8E;AAE9E,MAAM,GAAI,SAAQ,8BAAY;IAC5B;QACE,KAAK,CAAC,gBAAgB,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,KAAK;QACH,KAAK,CAAC,KAAK,EAAE,CAAC;QAEd,IAAI,CAAC,GAAG;aACL,WAAW,EAAE;aACb,IAAI,CAAC,CAAC,eAAe,EAAE,EAAE;YACxB,IAAI,CAAC,SAAS,CAAC,gCAAgC,eAAe,GAAG,CAAC,CAAC;YACnE,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,GAAmB,EAAE,EAAE;YAC7B,IAAI,CAAC,KAAK,CAAC,4BAA4B,GAAG,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC;QAC/D,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACH,IAAI;QACF,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;CACF;AAED,cAAc;AAEd,IAAI,GAAG,EAAE,CAAC,KAAK,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stoqey/ib",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Interactive Brokers TWS/IB Gateway API client library for Node.js (TS)",
|
|
6
6
|
"keywords": [
|
|
@@ -75,20 +75,20 @@
|
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@types/jest": "^29.5.4",
|
|
78
|
-
"@types/node": "^18.17.
|
|
78
|
+
"@types/node": "^18.17.15",
|
|
79
79
|
"@types/source-map-support": "^0.5.7",
|
|
80
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
81
|
-
"@typescript-eslint/parser": "^6.
|
|
80
|
+
"@typescript-eslint/eslint-plugin": "^6.7.0",
|
|
81
|
+
"@typescript-eslint/parser": "^6.7.0",
|
|
82
82
|
"ajv": "^8.12.0",
|
|
83
|
-
"eslint": "^8.
|
|
83
|
+
"eslint": "^8.49.0",
|
|
84
84
|
"eslint-plugin-jest": "^27.2.3",
|
|
85
85
|
"eslint-plugin-rxjs": "^5.0.3",
|
|
86
|
-
"jest": "^29.
|
|
87
|
-
"jest-environment-node": "^29.
|
|
86
|
+
"jest": "^29.7.0",
|
|
87
|
+
"jest-environment-node": "^29.7.0",
|
|
88
88
|
"jest-junit": "^16.0.0",
|
|
89
89
|
"ts-jest": "^29.1.1",
|
|
90
|
-
"typedoc": "^0.25.
|
|
91
|
-
"typescript": "^
|
|
90
|
+
"typedoc": "^0.25.1",
|
|
91
|
+
"typescript": "^5.2.2"
|
|
92
92
|
},
|
|
93
93
|
"engines": {
|
|
94
94
|
"node": ">=18.0.0"
|