@stoqey/ib 1.3.6 → 1.3.8
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 +20 -7
- package/dist/api/api.js +19 -8
- package/dist/api/api.js.map +1 -1
- package/dist/api/contract/cfd.js +2 -3
- package/dist/api/contract/cfd.js.map +1 -1
- package/dist/api/contract/combo.js +2 -3
- package/dist/api/contract/combo.js.map +1 -1
- package/dist/api/contract/fop.js +3 -4
- package/dist/api/contract/fop.js.map +1 -1
- package/dist/api/contract/ind.js +2 -3
- package/dist/api/contract/ind.js.map +1 -1
- package/dist/api/contract/option.js +2 -3
- package/dist/api/contract/option.js.map +1 -1
- package/dist/api/contract/stock.js +2 -3
- package/dist/api/contract/stock.js.map +1 -1
- package/dist/api/data/enum/event-name.d.ts +3 -1
- package/dist/api/data/enum/event-name.js +2 -0
- package/dist/api/data/enum/event-name.js.map +1 -1
- package/dist/api/data/enum/min-server-version.js +3 -2
- package/dist/api/data/enum/min-server-version.js.map +1 -1
- package/dist/api/market/scannerSubscription.d.ts +4 -3
- package/dist/api/order/market.js +3 -4
- package/dist/api/order/market.js.map +1 -1
- package/dist/api/order/stop.js +3 -4
- package/dist/api/order/stop.js.map +1 -1
- package/dist/api/order/stopLimit.js +3 -4
- package/dist/api/order/stopLimit.js.map +1 -1
- package/dist/api/order/trailingStop.js +3 -4
- package/dist/api/order/trailingStop.js.map +1 -1
- package/dist/api-next/api-next.d.ts +44 -4
- package/dist/api-next/api-next.js +235 -94
- package/dist/api-next/api-next.js.map +1 -1
- package/dist/api-next/common/error.d.ts +2 -0
- package/dist/api-next/common/item-list-update.d.ts +2 -0
- 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/configuration.js +4 -1
- package/dist/common/configuration.js.map +1 -1
- package/dist/common/errorCode.js +3 -2
- package/dist/common/errorCode.js.map +1 -1
- package/dist/common/logger.js +10 -7
- package/dist/common/logger.js.map +1 -1
- package/dist/core/api-next/auto-connection.js +2 -2
- package/dist/core/api-next/auto-connection.js.map +1 -1
- package/dist/core/api-next/item-list-update.d.ts +2 -1
- package/dist/core/api-next/item-list-update.js +2 -1
- package/dist/core/api-next/item-list-update.js.map +1 -1
- package/dist/core/api-next/subscription-registry.js +1 -2
- package/dist/core/api-next/subscription-registry.js.map +1 -1
- package/dist/core/api-next/subscription.d.ts +7 -3
- package/dist/core/api-next/subscription.js +18 -10
- package/dist/core/api-next/subscription.js.map +1 -1
- package/dist/core/io/controller.js +4 -6
- package/dist/core/io/controller.js.map +1 -1
- package/dist/core/io/decoder.d.ts +9 -5
- package/dist/core/io/decoder.js +41 -25
- package/dist/core/io/decoder.js.map +1 -1
- package/dist/core/io/encoder.d.ts +3 -2
- package/dist/core/io/encoder.js +43 -41
- package/dist/core/io/encoder.js.map +1 -1
- package/dist/core/io/enum/in-msg-id.d.ts +2 -1
- package/dist/core/io/enum/in-msg-id.js +1 -0
- package/dist/core/io/enum/in-msg-id.js.map +1 -1
- package/dist/core/io/socket.js +15 -15
- package/dist/core/io/socket.js.map +1 -1
- package/dist/tests/unit/api/api.test.js +31 -54
- package/dist/tests/unit/api/api.test.js.map +1 -1
- package/dist/tests/unit/api/connect.test.js +40 -14
- package/dist/tests/unit/api/connect.test.js.map +1 -1
- package/dist/tests/unit/api/market-data.test.d.ts +1 -0
- package/dist/tests/unit/api/market-data.test.js +84 -0
- package/dist/tests/unit/api/market-data.test.js.map +1 -0
- package/dist/tests/unit/api/order/placeOrder.test.js +118 -28
- package/dist/tests/unit/api/order/placeOrder.test.js.map +1 -1
- package/dist/tests/unit/api/order/reqAllOpenOrders.test.js +22 -23
- package/dist/tests/unit/api/order/reqAllOpenOrders.test.js.map +1 -1
- package/dist/tests/unit/api-next/get-account-summary.test.js +21 -24
- package/dist/tests/unit/api-next/get-account-summary.test.js.map +1 -1
- package/dist/tests/unit/api-next/get-contract-details.test.js +1 -1
- package/dist/tests/unit/api-next/get-contract-details.test.js.map +1 -1
- package/dist/tests/unit/api-next/get-market-data.test.js +1 -1
- package/dist/tests/unit/api-next/get-market-data.test.js.map +1 -1
- package/dist/tests/unit/api-next/get-positions.test.js +8 -9
- package/dist/tests/unit/api-next/get-positions.test.js.map +1 -1
- package/dist/tests/unit/api-next/place-order.test.js +3 -3
- package/dist/tests/unit/api-next/place-order.test.js.map +1 -1
- package/dist/tools/account-summary.js +4 -7
- package/dist/tools/account-summary.js.map +1 -1
- package/dist/tools/commission-reports.js +3 -6
- package/dist/tools/commission-reports.js.map +1 -1
- package/dist/tools/common/ib-api-next-app.d.ts +20 -1
- package/dist/tools/common/ib-api-next-app.js +103 -38
- package/dist/tools/common/ib-api-next-app.js.map +1 -1
- package/dist/tools/contract-details.js +3 -28
- package/dist/tools/contract-details.js.map +1 -1
- package/dist/tools/current-time.js +2 -3
- package/dist/tools/current-time.js.map +1 -1
- package/dist/tools/execution-details.js +3 -6
- package/dist/tools/execution-details.js.map +1 -1
- package/dist/tools/get-head-timestamp.js +11 -30
- package/dist/tools/get-head-timestamp.js.map +1 -1
- package/dist/tools/histogram-data.js +2 -3
- package/dist/tools/histogram-data.js.map +1 -1
- package/dist/tools/historical-data-updates.js +3 -5
- package/dist/tools/historical-data-updates.js.map +1 -1
- package/dist/tools/historical-data.js +2 -3
- package/dist/tools/historical-data.js.map +1 -1
- package/dist/tools/historical-ticks-bid-ask.js +3 -5
- package/dist/tools/historical-ticks-bid-ask.js.map +1 -1
- package/dist/tools/historical-ticks-last.js +4 -7
- package/dist/tools/historical-ticks-last.js.map +1 -1
- package/dist/tools/historical-ticks-mid.js +3 -5
- package/dist/tools/historical-ticks-mid.js.map +1 -1
- package/dist/tools/managed-accts.js +2 -3
- package/dist/tools/managed-accts.js.map +1 -1
- package/dist/tools/{market-data-single.js → market-data-snapshot.js} +13 -39
- package/dist/tools/market-data-snapshot.js.map +1 -0
- package/dist/tools/market-data.js +9 -43
- package/dist/tools/market-data.js.map +1 -1
- package/dist/tools/market-depth-exchanges.js +2 -3
- package/dist/tools/market-depth-exchanges.js.map +1 -1
- package/dist/tools/market-depth.js +4 -7
- package/dist/tools/market-depth.js.map +1 -1
- package/dist/tools/market-scanner.d.ts +1 -0
- package/dist/tools/market-scanner.js +64 -0
- package/dist/tools/market-scanner.js.map +1 -0
- package/dist/tools/modify-order.js +2 -5
- package/dist/tools/modify-order.js.map +1 -1
- package/dist/tools/next-valid-order-id.js +2 -3
- package/dist/tools/next-valid-order-id.js.map +1 -1
- package/dist/tools/open-orders-auto.js +5 -10
- package/dist/tools/open-orders-auto.js.map +1 -1
- package/dist/tools/open-orders.js +2 -3
- package/dist/tools/open-orders.js.map +1 -1
- package/dist/tools/place-new-order.js +2 -4
- package/dist/tools/place-new-order.js.map +1 -1
- package/dist/tools/place-order.d.ts +1 -1
- package/dist/tools/place-order.js +24 -20
- package/dist/tools/place-order.js.map +1 -1
- package/dist/tools/pnl-single.js +3 -10
- package/dist/tools/pnl-single.js.map +1 -1
- package/dist/tools/pnl.js +3 -10
- package/dist/tools/pnl.js.map +1 -1
- package/dist/tools/positions.js +4 -12
- package/dist/tools/positions.js.map +1 -1
- package/dist/tools/search-contracts.js +2 -3
- package/dist/tools/search-contracts.js.map +1 -1
- package/dist/tools/sec-def-opt-params.js +7 -6
- package/dist/tools/sec-def-opt-params.js.map +1 -1
- package/dist/tools/user-info.d.ts +4 -0
- package/dist/tools/user-info.js +51 -0
- package/dist/tools/user-info.js.map +1 -0
- package/package.json +51 -53
- package/dist/tools/market-data-single.js.map +0 -1
- /package/dist/tools/{market-data-single.d.ts → market-data-snapshot.d.ts} +0 -0
|
@@ -7,7 +7,7 @@ const __1 = require("../../..");
|
|
|
7
7
|
const configuration_1 = __importDefault(require("../../../common/configuration"));
|
|
8
8
|
// import configuration from "../../../common/configuration";
|
|
9
9
|
describe("Place orders to IB", () => {
|
|
10
|
-
test("Error Event",
|
|
10
|
+
test("Error Event", (done) => {
|
|
11
11
|
const apiNext = new __1.IBApiNext();
|
|
12
12
|
const api = apiNext.api;
|
|
13
13
|
api
|
|
@@ -16,13 +16,13 @@ describe("Place orders to IB", () => {
|
|
|
16
16
|
})
|
|
17
17
|
.on(__1.EventName.openOrder, (openOrderId, _contract, _order, _orderState) => {
|
|
18
18
|
expect(openOrderId).toEqual(orderId);
|
|
19
|
-
done();
|
|
19
|
+
// done();
|
|
20
20
|
})
|
|
21
21
|
.on(__1.EventName.orderStatus, (openOrderId, status, filled, ..._arg) => {
|
|
22
22
|
expect(openOrderId).toEqual(orderId);
|
|
23
23
|
expect(status).toEqual(__1.OrderStatus.Submitted);
|
|
24
24
|
expect(filled).toBeFalsy();
|
|
25
|
-
done();
|
|
25
|
+
// done();
|
|
26
26
|
})
|
|
27
27
|
.on(__1.EventName.openOrderEnd, () => {
|
|
28
28
|
done();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"place-order.test.js","sourceRoot":"","sources":["../../../../src/tests/unit/api-next/place-order.test.ts"],"names":[],"mappings":";;;;;AAAA,gCAWkB;AAClB,kFAA0D;AAC1D,6DAA6D;AAE7D,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,IAAI,CAAC,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"place-order.test.js","sourceRoot":"","sources":["../../../../src/tests/unit/api-next/place-order.test.ts"],"names":[],"mappings":";;;;;AAAA,gCAWkB;AAClB,kFAA0D;AAC1D,6DAA6D;AAE7D,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,IAAI,CAAC,aAAa,EAAE,CAAC,IAAI,EAAE,EAAE;QAC3B,MAAM,OAAO,GAAG,IAAI,aAAS,EAAE,CAAC;QAChC,MAAM,GAAG,GAAI,OAA8C,CAAC,GAAY,CAAC;QACzE,GAAG;aACA,EAAE,CAAC,aAAS,CAAC,KAAK,EAAE,CAAC,KAAY,EAAE,KAAgB,EAAE,MAAc,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,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;QACxD,GAAG,CAAC,IAAI,CAAC,aAAS,CAAC,WAAW,EAAE,OAAO,EAAE,eAAW,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;QACnE,GAAG,CAAC,IAAI,CAAC,aAAS,CAAC,YAAY,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -7,7 +7,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
const path_1 = __importDefault(require("path"));
|
|
10
|
-
const logger_1 = __importDefault(require("../common/logger"));
|
|
11
10
|
const ib_api_next_app_1 = require("./common/ib-api-next-app");
|
|
12
11
|
/////////////////////////////////////////////////////////////////////////////////
|
|
13
12
|
// Default options values. //
|
|
@@ -48,12 +47,11 @@ class PrintAccountSummaryApp extends ib_api_next_app_1.IBApiNextApp {
|
|
|
48
47
|
* Start the app.
|
|
49
48
|
*/
|
|
50
49
|
start() {
|
|
51
|
-
var _a, _b;
|
|
52
50
|
const scriptName = path_1.default.basename(__filename);
|
|
53
|
-
|
|
54
|
-
this.connect(
|
|
51
|
+
this.info(`Starting ${scriptName} script`);
|
|
52
|
+
this.connect();
|
|
55
53
|
this.subscription$ = this.api
|
|
56
|
-
.getAccountSummary(
|
|
54
|
+
.getAccountSummary(this.cmdLineArgs.group ?? DEFAULT_GROUP, this.cmdLineArgs.tags ?? DEFAULT_TAGS)
|
|
57
55
|
.subscribe({
|
|
58
56
|
next: (summaries) => {
|
|
59
57
|
this.printObject(summaries);
|
|
@@ -70,8 +68,7 @@ class PrintAccountSummaryApp extends ib_api_next_app_1.IBApiNextApp {
|
|
|
70
68
|
* Stop the app with success code.
|
|
71
69
|
*/
|
|
72
70
|
stop() {
|
|
73
|
-
|
|
74
|
-
(_a = this.subscription$) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
71
|
+
this.subscription$?.unsubscribe();
|
|
75
72
|
this.exit();
|
|
76
73
|
}
|
|
77
74
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-summary.js","sourceRoot":"","sources":["../../src/tools/account-summary.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;AAEH,gDAAwB;AAIxB,
|
|
1
|
+
{"version":3,"file":"account-summary.js","sourceRoot":"","sources":["../../src/tools/account-summary.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;AAEH,gDAAwB;AAIxB,8DAAwD;AAExD,iFAAiF;AACjF,iFAAiF;AACjF,iFAAiF;AAEjF,8DAA8D;AAC9D,MAAM,aAAa,GAAG,KAAK,CAAC;AAE5B,4DAA4D;AAC5D,MAAM,YAAY,GAAG,kDAAkD,CAAC;AAExE,iFAAiF;AACjF,iFAAiF;AACjF,iFAAiF;AAEjF,MAAM,gBAAgB,GAAG,+BAA+B,CAAC;AACzD,MAAM,UAAU,GAAG,qCAAqC,CAAC;AACzD,MAAM,gBAAgB,GAAuB;IAC3C;QACE,cAAc;QACd,2CAA2C,aAAa,IAAI;KAC7D;IACD;QACE,iBAAiB;QACjB,6DAA6D,YAAY,GAAG;KAC7E;IACD;QACE,OAAO;QACP,gIAAgI;YAC9H,yEAAyE;KAC5E;CACF,CAAC;AACF,MAAM,YAAY,GAChB,0EAA0E,CAAC;AAE7E,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;IAKD;;OAEG;IACH,KAAK;QACH,MAAM,UAAU,GAAG,cAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAC7C,IAAI,CAAC,IAAI,CAAC,YAAY,UAAU,SAAS,CAAC,CAAC;QAC3C,IAAI,CAAC,OAAO,EAAE,CAAC;QAEf,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,GAAG;aAC1B,iBAAiB,CACf,IAAI,CAAC,WAAW,CAAC,KAAgB,IAAI,aAAa,EAClD,IAAI,CAAC,WAAW,CAAC,IAAe,IAAI,YAAY,CAClD;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,kCAAkC,GAAG,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC;YACrE,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,sBAAsB,EAAE,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -7,16 +7,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
* This App will print IBKR account place new orders to console.
|
|
8
8
|
*/
|
|
9
9
|
const path_1 = __importDefault(require("path"));
|
|
10
|
-
const logger_1 = __importDefault(require("../common/logger"));
|
|
11
10
|
const ib_api_next_app_1 = require("./common/ib-api-next-app");
|
|
12
11
|
/////////////////////////////////////////////////////////////////////////////////
|
|
13
12
|
// The help text. //
|
|
14
13
|
/////////////////////////////////////////////////////////////////////////////////
|
|
15
14
|
const DESCRIPTION_TEXT = "Get commission report.";
|
|
16
15
|
const USAGE_TEXT = "Usage: commission-reports.js <options>";
|
|
17
|
-
const OPTION_ARGUMENTS = [
|
|
18
|
-
["clientId=<number>", "Client id of current ib connection. Default is 0"],
|
|
19
|
-
];
|
|
16
|
+
const OPTION_ARGUMENTS = [];
|
|
20
17
|
const EXAMPLE_TEXT = "commission-reports.js -clientId=0";
|
|
21
18
|
//////////////////////////////////////////////////////////////////////////////
|
|
22
19
|
// The App code //
|
|
@@ -30,8 +27,8 @@ class CommissionReportApp extends ib_api_next_app_1.IBApiNextApp {
|
|
|
30
27
|
*/
|
|
31
28
|
start() {
|
|
32
29
|
const scriptName = path_1.default.basename(__filename);
|
|
33
|
-
|
|
34
|
-
this.connect(
|
|
30
|
+
this.info(`Starting ${scriptName} script`);
|
|
31
|
+
this.connect();
|
|
35
32
|
const executionFilter = {
|
|
36
33
|
clientId: "0",
|
|
37
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commission-reports.js","sourceRoot":"","sources":["../../src/tools/commission-reports.ts"],"names":[],"mappings":";;;;;AAAA;;GAEG;AACH,gDAAwB;AAGxB,
|
|
1
|
+
{"version":3,"file":"commission-reports.js","sourceRoot":"","sources":["../../src/tools/commission-reports.ts"],"names":[],"mappings":";;;;;AAAA;;GAEG;AACH,gDAAwB;AAGxB,8DAAwD;AAExD,iFAAiF;AACjF,iFAAiF;AACjF,iFAAiF;AAEjF,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAClD,MAAM,UAAU,GAAG,wCAAwC,CAAC;AAC5D,MAAM,gBAAgB,GAAuB,EAAE,CAAC;AAChD,MAAM,YAAY,GAAG,oCAAoC,CAAC;AAE1D,8EAA8E;AAC9E,8EAA8E;AAC9E,8EAA8E;AAE9E,MAAM,mBAAoB,SAAQ,8BAAY;IAC5C;QACE,KAAK,CAAC,gBAAgB,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC;IACtE,CAAC;IACD;;OAEG;IACH,KAAK;QACH,MAAM,UAAU,GAAG,cAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAC7C,IAAI,CAAC,IAAI,CAAC,YAAY,UAAU,SAAS,CAAC,CAAC;QAC3C,IAAI,CAAC,OAAO,EAAE,CAAC;QAEf,MAAM,eAAe,GAAoB;YACvC,QAAQ,EAAE,GAAG;SACd,CAAC;QACF,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC,IAAI,CAChD,CAAC,iBAAiB,EAAE,EAAE;YACpB,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;YACpC,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,CAAC,EACD,CAAC,KAAK,EAAE,EAAE;YACR,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC,CACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,IAAI;QACF,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;CACF;AAED,cAAc;AAEd,IAAI,mBAAmB,EAAE,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { Subscription } from "rxjs";
|
|
2
2
|
import { IBApiNext } from "../../api-next";
|
|
3
|
+
import Contract from "../../api/contract/contract";
|
|
4
|
+
import LogLevel from "../../api/data/enum/log-level";
|
|
3
5
|
/**
|
|
4
6
|
* Base-class for the [[IBApiNext]] apps.
|
|
5
7
|
*/
|
|
6
8
|
export declare class IBApiNextApp {
|
|
9
|
+
static readonly DEFAULT_CONTRACT_OPTIONS: [string, string][];
|
|
10
|
+
static readonly DEFAULT_OPT_CONTRACT_OPTIONS: [string, string][];
|
|
11
|
+
protected logLevel: LogLevel;
|
|
7
12
|
constructor(appDescription: string, usageDescription: string, optionArgumentDescriptions: [string, string][], usageExample: string);
|
|
8
13
|
/** Common command line options of all [[IBApiNext]] apps. */
|
|
9
14
|
private readonly COMMON_OPTION_ARGUMENTS;
|
|
@@ -24,9 +29,21 @@ export declare class IBApiNextApp {
|
|
|
24
29
|
*/
|
|
25
30
|
printObject(obj: unknown): void;
|
|
26
31
|
/**
|
|
27
|
-
* Print
|
|
32
|
+
* Print an error message and exit the app with error code, unless -watch argument is present.
|
|
28
33
|
*/
|
|
29
34
|
error(text: string): void;
|
|
35
|
+
/**
|
|
36
|
+
* Print a warning message
|
|
37
|
+
*/
|
|
38
|
+
warn(text: string): void;
|
|
39
|
+
/**
|
|
40
|
+
* Print an wainformation message
|
|
41
|
+
*/
|
|
42
|
+
info(text: string): void;
|
|
43
|
+
/**
|
|
44
|
+
* Print an wainformation message
|
|
45
|
+
*/
|
|
46
|
+
debug(text: string): void;
|
|
30
47
|
/**
|
|
31
48
|
* Exit the app.
|
|
32
49
|
*/
|
|
@@ -35,4 +52,6 @@ export declare class IBApiNextApp {
|
|
|
35
52
|
private parseCommandLine;
|
|
36
53
|
/** Format the help text. */
|
|
37
54
|
private formatHelpText;
|
|
55
|
+
/** get contract from command line args */
|
|
56
|
+
getContractArg(): Contract;
|
|
38
57
|
}
|
|
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.IBApiNextApp = void 0;
|
|
7
|
-
const colors_1 = __importDefault(require("colors"));
|
|
8
7
|
const api_next_1 = require("../../api-next");
|
|
9
8
|
const log_level_1 = __importDefault(require("../../api/data/enum/log-level"));
|
|
10
9
|
const configuration_1 = __importDefault(require("../../common/configuration"));
|
|
@@ -40,53 +39,67 @@ class IBApiNextApp {
|
|
|
40
39
|
"IP or hostname of the TWS or IB Gateway. Default is 127.0.0.1.",
|
|
41
40
|
],
|
|
42
41
|
["port=<number>", "Post number of the TWS or IB Gateway. Default is 4002."],
|
|
42
|
+
[
|
|
43
|
+
"clientId=<number>",
|
|
44
|
+
"Client id of current ib connection. Default is random",
|
|
45
|
+
],
|
|
43
46
|
[
|
|
44
47
|
"watch",
|
|
45
|
-
"Watch for changes. If specified, the app will keep running and print
|
|
46
|
-
"If not specified, the app will print a one-time snapshot and
|
|
48
|
+
"Watch for changes. If specified, the app will keep running and print updates as received from TWS. " +
|
|
49
|
+
"If not specified, the app will print a one-time snapshot and then exit.",
|
|
47
50
|
],
|
|
48
51
|
];
|
|
49
52
|
this.parseCommandLine(appDescription, usageDescription, [...this.COMMON_OPTION_ARGUMENTS, ...optionArgumentDescriptions], usageExample);
|
|
53
|
+
if (this.cmdLineArgs.log) {
|
|
54
|
+
switch (this.cmdLineArgs.log) {
|
|
55
|
+
case "error":
|
|
56
|
+
this.logLevel = log_level_1.default.ERROR;
|
|
57
|
+
break;
|
|
58
|
+
case "warn":
|
|
59
|
+
this.logLevel = log_level_1.default.WARN;
|
|
60
|
+
break;
|
|
61
|
+
case "info":
|
|
62
|
+
this.logLevel = log_level_1.default.INFO;
|
|
63
|
+
break;
|
|
64
|
+
case "debug":
|
|
65
|
+
this.logLevel = log_level_1.default.DETAIL;
|
|
66
|
+
break;
|
|
67
|
+
default:
|
|
68
|
+
this.error(`Unknown value '${this.cmdLineArgs.log}' on -log argument.`);
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
this.logLevel = log_level_1.default.ERROR;
|
|
74
|
+
}
|
|
50
75
|
}
|
|
51
76
|
/** Connect to TWS. */
|
|
52
77
|
connect(reconnectInterval, clientId) {
|
|
53
78
|
// create the IBApiNext object
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
79
|
+
const port = this.cmdLineArgs.port ?? configuration_1.default.ib_port;
|
|
80
|
+
const host = this.cmdLineArgs.host ?? configuration_1.default.ib_host;
|
|
81
|
+
if (reconnectInterval === undefined && this.cmdLineArgs.watch)
|
|
82
|
+
reconnectInterval = 10000;
|
|
83
|
+
if (clientId === undefined && this.cmdLineArgs.clientId)
|
|
84
|
+
clientId = +this.cmdLineArgs.clientId;
|
|
85
|
+
this.info(`Logging into server: ${host}:${port}`);
|
|
58
86
|
if (!this.api) {
|
|
59
87
|
this.api = new api_next_1.IBApiNext({
|
|
60
88
|
reconnectInterval,
|
|
61
89
|
host,
|
|
62
90
|
port,
|
|
91
|
+
logger: logger_1.default,
|
|
63
92
|
});
|
|
64
|
-
|
|
65
|
-
switch (this.cmdLineArgs.log) {
|
|
66
|
-
case "error":
|
|
67
|
-
this.api.logLevel = log_level_1.default.ERROR;
|
|
68
|
-
break;
|
|
69
|
-
case "warn":
|
|
70
|
-
this.api.logLevel = log_level_1.default.WARN;
|
|
71
|
-
break;
|
|
72
|
-
case "info":
|
|
73
|
-
this.api.logLevel = log_level_1.default.INFO;
|
|
74
|
-
break;
|
|
75
|
-
case "debug":
|
|
76
|
-
this.api.logLevel = log_level_1.default.DETAIL;
|
|
77
|
-
break;
|
|
78
|
-
default:
|
|
79
|
-
this.error(`Unknown value '${this.cmdLineArgs.log}' on -log argument.`);
|
|
80
|
-
break;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
93
|
+
this.api.logLevel = this.logLevel;
|
|
83
94
|
}
|
|
84
95
|
// log generic errors (reqId = -1) and exit with failure code
|
|
85
96
|
if (!this.error$) {
|
|
86
97
|
this.error$ = this.api.errorSubject.subscribe((error) => {
|
|
87
98
|
if (error.reqId === -1) {
|
|
88
|
-
this.
|
|
89
|
-
|
|
99
|
+
this.warn(`${error.error.message} (Error #${error.code})`);
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
this.error(`${error.error.message} (Error #${error.code}) ${error.advancedOrderReject ? error.advancedOrderReject : ""}`);
|
|
90
103
|
}
|
|
91
104
|
});
|
|
92
105
|
}
|
|
@@ -94,8 +107,7 @@ class IBApiNextApp {
|
|
|
94
107
|
this.api.connect(clientId);
|
|
95
108
|
}
|
|
96
109
|
catch (error) {
|
|
97
|
-
|
|
98
|
-
logger_1.default.debug(`IB host: ${host} - IB port: ${port}`);
|
|
110
|
+
this.error(error.message);
|
|
99
111
|
}
|
|
100
112
|
}
|
|
101
113
|
/**
|
|
@@ -111,34 +123,53 @@ class IBApiNextApp {
|
|
|
111
123
|
console.log(`${JSON.stringify(obj, jsonReplacer, 2)}`);
|
|
112
124
|
}
|
|
113
125
|
/**
|
|
114
|
-
* Print
|
|
126
|
+
* Print an error message and exit the app with error code, unless -watch argument is present.
|
|
115
127
|
*/
|
|
116
128
|
error(text) {
|
|
117
|
-
|
|
129
|
+
logger_1.default.error(text);
|
|
118
130
|
if (!this.cmdLineArgs.watch) {
|
|
119
131
|
this.exit(1);
|
|
120
132
|
}
|
|
121
133
|
}
|
|
134
|
+
/**
|
|
135
|
+
* Print a warning message
|
|
136
|
+
*/
|
|
137
|
+
warn(text) {
|
|
138
|
+
if (this.logLevel >= log_level_1.default.WARN)
|
|
139
|
+
logger_1.default.warn(text);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Print an wainformation message
|
|
143
|
+
*/
|
|
144
|
+
info(text) {
|
|
145
|
+
if (this.logLevel >= log_level_1.default.INFO)
|
|
146
|
+
logger_1.default.info(text);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Print an wainformation message
|
|
150
|
+
*/
|
|
151
|
+
debug(text) {
|
|
152
|
+
if (this.logLevel >= log_level_1.default.DETAIL)
|
|
153
|
+
logger_1.default.debug(text);
|
|
154
|
+
}
|
|
122
155
|
/**
|
|
123
156
|
* Exit the app.
|
|
124
157
|
*/
|
|
125
158
|
exit(exitCode = 0) {
|
|
126
|
-
|
|
127
|
-
(_a = this.error$) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
159
|
+
this.error$?.unsubscribe();
|
|
128
160
|
process.exit(exitCode);
|
|
129
161
|
}
|
|
130
162
|
/** Parse the command line. */
|
|
131
163
|
parseCommandLine(description, usage, optionArguments, example) {
|
|
132
164
|
this.cmdLineArgs = {};
|
|
133
165
|
process.argv.slice(2).forEach((arg) => {
|
|
134
|
-
var _a;
|
|
135
166
|
const pair = arg.split("=");
|
|
136
167
|
const name = pair[0].substr(1);
|
|
137
168
|
if (!optionArguments.find((v) => v[0].split("=")[0] == name)) {
|
|
138
|
-
console.error("ERROR: Unknown argument
|
|
139
|
-
|
|
169
|
+
console.error("ERROR: Unknown argument " + pair[0]);
|
|
170
|
+
this.exit(1);
|
|
140
171
|
}
|
|
141
|
-
this.cmdLineArgs[name] = pair.length > 1 ?
|
|
172
|
+
this.cmdLineArgs[name] = pair.length > 1 ? pair[1] ?? "1" : "1";
|
|
142
173
|
});
|
|
143
174
|
if (this.cmdLineArgs.h || this.cmdLineArgs.help) {
|
|
144
175
|
console.info(this.formatHelpText(description, usage, optionArguments, example));
|
|
@@ -153,6 +184,40 @@ class IBApiNextApp {
|
|
|
153
184
|
});
|
|
154
185
|
return result + "Example: " + example;
|
|
155
186
|
}
|
|
187
|
+
/** get contract from command line args */
|
|
188
|
+
getContractArg() {
|
|
189
|
+
return {
|
|
190
|
+
conId: this.cmdLineArgs.conid ?? undefined,
|
|
191
|
+
secType: this.cmdLineArgs.sectype,
|
|
192
|
+
symbol: this.cmdLineArgs.symbol,
|
|
193
|
+
currency: this.cmdLineArgs.currency ?? "USD",
|
|
194
|
+
exchange: this.cmdLineArgs.exchange ?? "SMART",
|
|
195
|
+
lastTradeDateOrContractMonth: this.cmdLineArgs.expiry,
|
|
196
|
+
strike: this.cmdLineArgs.strike ?? undefined,
|
|
197
|
+
right: this.cmdLineArgs.right,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
156
200
|
}
|
|
157
201
|
exports.IBApiNextApp = IBApiNextApp;
|
|
202
|
+
// private compat_mode: boolean = false;
|
|
203
|
+
IBApiNextApp.DEFAULT_CONTRACT_OPTIONS = [
|
|
204
|
+
["conid=<number>", "Contract ID (conId) of the contract."],
|
|
205
|
+
[
|
|
206
|
+
"sectype=<type>",
|
|
207
|
+
"The security type. Valid values: STK, OPT, FUT, IND, FOP, CFD, CASH, BAG, BOND, CMDTY, NEWS and FUND",
|
|
208
|
+
],
|
|
209
|
+
["symbol=<name>", "The symbol name."],
|
|
210
|
+
["currency=<currency>", "The contract currency."],
|
|
211
|
+
["exchange=<name>", "The destination exchange name."],
|
|
212
|
+
];
|
|
213
|
+
IBApiNextApp.DEFAULT_OPT_CONTRACT_OPTIONS = [
|
|
214
|
+
...IBApiNextApp.DEFAULT_CONTRACT_OPTIONS,
|
|
215
|
+
[
|
|
216
|
+
"expiry=<YYYYMM>",
|
|
217
|
+
"The contract's last trading day or contract month (for Options and Futures)." +
|
|
218
|
+
"Strings with format YYYYMM will be interpreted as the Contract Month whereas YYYYMMDD will be interpreted as Last Trading Day.",
|
|
219
|
+
],
|
|
220
|
+
["strike=<number>", "The option's strike price."],
|
|
221
|
+
["right=<P|C>", " The option type. Valid values are P, PUT, C, CALL."],
|
|
222
|
+
];
|
|
158
223
|
//# sourceMappingURL=ib-api-next-app.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ib-api-next-app.js","sourceRoot":"","sources":["../../../src/tools/common/ib-api-next-app.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"ib-api-next-app.js","sourceRoot":"","sources":["../../../src/tools/common/ib-api-next-app.ts"],"names":[],"mappings":";;;;;;AAEA,6CAA2C;AAE3C,8EAAqD;AAGrD,+EAAuD;AACvD,iEAAyC;AAEzC;;;;GAIG;AACH,SAAS,YAAY,CAAC,GAAG,EAAE,KAAK;IAC9B,IAAI,KAAK,YAAY,GAAG,EAAE;QACxB,MAAM,MAAM,GAAyB,EAAE,CAAC;QACxC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YACrB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;KACf;SAAM;QACL,OAAO,KAAK,CAAC;KACd;AACH,CAAC;AAED;;GAEG;AACH,MAAa,YAAY;IA2BvB,YACE,cAAsB,EACtB,gBAAwB,EACxB,0BAA8C,EAC9C,YAAoB;QAiCtB,6DAA6D;QAC5C,4BAAuB,GAAuB;YAC7D,CAAC,GAAG,EAAE,iCAAiC,CAAC;YACxC,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AC"}
|
|
@@ -7,7 +7,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
const path_1 = __importDefault(require("path"));
|
|
10
|
-
const logger_1 = __importDefault(require("../common/logger"));
|
|
11
10
|
const ib_api_next_app_1 = require("./common/ib-api-next-app");
|
|
12
11
|
/////////////////////////////////////////////////////////////////////////////////
|
|
13
12
|
// The help text //
|
|
@@ -15,21 +14,7 @@ const ib_api_next_app_1 = require("./common/ib-api-next-app");
|
|
|
15
14
|
const DESCRIPTION_TEXT = "Requests contract details from TWS and prints it to console.";
|
|
16
15
|
const USAGE_TEXT = "Usage: contract-details.js <options>";
|
|
17
16
|
const OPTION_ARGUMENTS = [
|
|
18
|
-
|
|
19
|
-
["symbol=<name>", "The symbol name."],
|
|
20
|
-
[
|
|
21
|
-
"sectype=<type>",
|
|
22
|
-
"The security type. Valid values: STK, OPT, FUT, IND, FOP, CFD, CASH, BAG, BOND, CMDTY, NEWS, FUND and CRYPTO.",
|
|
23
|
-
],
|
|
24
|
-
["exchange=<name>", "The destination exchange name."],
|
|
25
|
-
["currency=<currency>", "The contract currency."],
|
|
26
|
-
[
|
|
27
|
-
"expiry=<YYYYMM>",
|
|
28
|
-
"The contract's last trading day or contract month (for Options and Futures)." +
|
|
29
|
-
"Strings with format YYYYMM will be interpreted as the Contract Month whereas YYYYMMDD will be interpreted as Last Trading Day.",
|
|
30
|
-
],
|
|
31
|
-
["strike=<number>", "The option's strike price."],
|
|
32
|
-
["right=<P|C>", " The option type. Valid values are P, PUT, C, CALL."],
|
|
17
|
+
...ib_api_next_app_1.IBApiNextApp.DEFAULT_CONTRACT_OPTIONS,
|
|
33
18
|
];
|
|
34
19
|
const EXAMPLE_TEXT = "contract-details.ts -symbol=AMZN -sectype=STK -currency=USD";
|
|
35
20
|
//////////////////////////////////////////////////////////////////////////////
|
|
@@ -43,21 +28,11 @@ class PrintContractDetailsApp extends ib_api_next_app_1.IBApiNextApp {
|
|
|
43
28
|
* Start the app.
|
|
44
29
|
*/
|
|
45
30
|
start() {
|
|
46
|
-
var _a, _b;
|
|
47
31
|
const scriptName = path_1.default.basename(__filename);
|
|
48
|
-
|
|
32
|
+
this.info(`Starting ${scriptName} script`);
|
|
49
33
|
this.connect();
|
|
50
34
|
this.api
|
|
51
|
-
.getContractDetails(
|
|
52
|
-
symbol: this.cmdLineArgs.symbol,
|
|
53
|
-
conId: (_a = this.cmdLineArgs.conid) !== null && _a !== void 0 ? _a : undefined,
|
|
54
|
-
secType: this.cmdLineArgs.sectype,
|
|
55
|
-
exchange: this.cmdLineArgs.exchange,
|
|
56
|
-
currency: this.cmdLineArgs.currency,
|
|
57
|
-
lastTradeDateOrContractMonth: this.cmdLineArgs.expiry,
|
|
58
|
-
strike: (_b = this.cmdLineArgs.strike) !== null && _b !== void 0 ? _b : undefined,
|
|
59
|
-
right: this.cmdLineArgs.right,
|
|
60
|
-
})
|
|
35
|
+
.getContractDetails(this.getContractArg())
|
|
61
36
|
.then((details) => {
|
|
62
37
|
this.printObject(details);
|
|
63
38
|
this.stop();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-details.js","sourceRoot":"","sources":["../../src/tools/contract-details.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;AAEH,gDAAwB;
|
|
1
|
+
{"version":3,"file":"contract-details.js","sourceRoot":"","sources":["../../src/tools/contract-details.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;AAEH,gDAAwB;AAGxB,8DAAwD;AAExD,iFAAiF;AACjF,iFAAiF;AACjF,iFAAiF;AAEjF,MAAM,gBAAgB,GACpB,8DAA8D,CAAC;AACjE,MAAM,UAAU,GAAG,sCAAsC,CAAC;AAC1D,MAAM,gBAAgB,GAAuB;IAC3C,GAAG,8BAAY,CAAC,wBAAwB;CACzC,CAAC;AACF,MAAM,YAAY,GAChB,6DAA6D,CAAC;AAEhE,8EAA8E;AAC9E,8EAA8E;AAC9E,8EAA8E;AAE9E,MAAM,uBAAwB,SAAQ,8BAAY;IAChD;QACE,KAAK,CAAC,gBAAgB,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,KAAK;QACH,MAAM,UAAU,GAAG,cAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAC7C,IAAI,CAAC,IAAI,CAAC,YAAY,UAAU,SAAS,CAAC,CAAC;QAC3C,IAAI,CAAC,OAAO,EAAE,CAAC;QAEf,IAAI,CAAC,GAAG;aACL,kBAAkB,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;aACzC,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,uBAAuB,EAAE,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -7,7 +7,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
const path_1 = __importDefault(require("path"));
|
|
10
|
-
const logger_1 = __importDefault(require("../common/logger"));
|
|
11
10
|
const ib_api_next_app_1 = require("./common/ib-api-next-app");
|
|
12
11
|
/////////////////////////////////////////////////////////////////////////////////
|
|
13
12
|
// Help text and command line parsing //
|
|
@@ -28,8 +27,8 @@ class PrintCurrentTimeApp extends ib_api_next_app_1.IBApiNextApp {
|
|
|
28
27
|
*/
|
|
29
28
|
start() {
|
|
30
29
|
const scriptName = path_1.default.basename(__filename);
|
|
31
|
-
|
|
32
|
-
this.connect(
|
|
30
|
+
this.info(`Starting ${scriptName} script`);
|
|
31
|
+
this.connect();
|
|
33
32
|
// print current time
|
|
34
33
|
this.api
|
|
35
34
|
.getCurrentTime()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"current-time.js","sourceRoot":"","sources":["../../src/tools/current-time.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;AAEH,gDAAwB;AAGxB,
|
|
1
|
+
{"version":3,"file":"current-time.js","sourceRoot":"","sources":["../../src/tools/current-time.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;AAEH,gDAAwB;AAGxB,8DAAwD;AAExD,iFAAiF;AACjF,iFAAiF;AACjF,iFAAiF;AAEjF,MAAM,gBAAgB,GAAG,8BAA8B,CAAC;AACxD,MAAM,UAAU,GAAG,kCAAkC,CAAC;AACtD,MAAM,gBAAgB,GAAuB,EAAE,CAAC;AAChD,MAAM,YAAY,GAAG,4CAA4C,CAAC;AAElE,8EAA8E;AAC9E,8EAA8E;AAC9E,8EAA8E;AAE9E,MAAM,mBAAoB,SAAQ,8BAAY;IAC5C;QACE,KAAK,CAAC,gBAAgB,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,KAAK;QACH,MAAM,UAAU,GAAG,cAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAC7C,IAAI,CAAC,IAAI,CAAC,YAAY,UAAU,SAAS,CAAC,CAAC;QAC3C,IAAI,CAAC,OAAO,EAAE,CAAC;QAEf,qBAAqB;QAErB,IAAI,CAAC,GAAG;aACL,cAAc,EAAE;aAChB,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;YACb,MAAM,QAAQ,GAAG,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,0CAA0C;YAClF,IAAI,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;YACnD,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,GAAmB,EAAE,EAAE;YAC7B,IAAI,CAAC,KAAK,CAAC,+BAA+B,GAAG,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC;QAClE,CAAC,CAAC,CAAC;IACP,CAAC;CACF;AAED,cAAc;AAEd,IAAI,mBAAmB,EAAE,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -7,16 +7,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
* This App will print IBKR account place new orders to console.
|
|
8
8
|
*/
|
|
9
9
|
const path_1 = __importDefault(require("path"));
|
|
10
|
-
const logger_1 = __importDefault(require("../common/logger"));
|
|
11
10
|
const ib_api_next_app_1 = require("./common/ib-api-next-app");
|
|
12
11
|
/////////////////////////////////////////////////////////////////////////////////
|
|
13
12
|
// The help text. //
|
|
14
13
|
/////////////////////////////////////////////////////////////////////////////////
|
|
15
14
|
const DESCRIPTION_TEXT = "Get close orders.";
|
|
16
15
|
const USAGE_TEXT = "Usage: close-order.js <options>";
|
|
17
|
-
const OPTION_ARGUMENTS = [
|
|
18
|
-
["clientId=<number>", "Client id of current ib connection. Default is 0"],
|
|
19
|
-
];
|
|
16
|
+
const OPTION_ARGUMENTS = [];
|
|
20
17
|
const EXAMPLE_TEXT = "close-order.js -clientId=0";
|
|
21
18
|
//////////////////////////////////////////////////////////////////////////////
|
|
22
19
|
// The App code //
|
|
@@ -30,8 +27,8 @@ class CloseOrdersApp extends ib_api_next_app_1.IBApiNextApp {
|
|
|
30
27
|
*/
|
|
31
28
|
start() {
|
|
32
29
|
const scriptName = path_1.default.basename(__filename);
|
|
33
|
-
|
|
34
|
-
this.connect(
|
|
30
|
+
this.info(`Starting ${scriptName} script`);
|
|
31
|
+
this.connect();
|
|
35
32
|
const executionFilter = {
|
|
36
33
|
clientId: "0",
|
|
37
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-details.js","sourceRoot":"","sources":["../../src/tools/execution-details.ts"],"names":[],"mappings":";;;;;AAAA;;GAEG;AACH,gDAAwB;AAGxB,
|
|
1
|
+
{"version":3,"file":"execution-details.js","sourceRoot":"","sources":["../../src/tools/execution-details.ts"],"names":[],"mappings":";;;;;AAAA;;GAEG;AACH,gDAAwB;AAGxB,8DAAwD;AAExD,iFAAiF;AACjF,iFAAiF;AACjF,iFAAiF;AAEjF,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AAC7C,MAAM,UAAU,GAAG,iCAAiC,CAAC;AACrD,MAAM,gBAAgB,GAAuB,EAAE,CAAC;AAChD,MAAM,YAAY,GAAG,4BAA4B,CAAC;AAElD,8EAA8E;AAC9E,8EAA8E;AAC9E,8EAA8E;AAE9E,MAAM,cAAe,SAAQ,8BAAY;IACvC;QACE,KAAK,CAAC,gBAAgB,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC;IACtE,CAAC;IACD;;OAEG;IACH,KAAK;QACH,MAAM,UAAU,GAAG,cAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAC7C,IAAI,CAAC,IAAI,CAAC,YAAY,UAAU,SAAS,CAAC,CAAC;QAC3C,IAAI,CAAC,OAAO,EAAE,CAAC;QAEf,MAAM,eAAe,GAAoB;YACvC,QAAQ,EAAE,GAAG;SACd,CAAC;QACF,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC,IAAI,CAChD,CAAC,YAAY,EAAE,EAAE;YACf,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;YAC/B,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,CAAC,EACD,CAAC,KAAK,EAAE,EAAE;YACR,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC,CACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,IAAI;QACF,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;CACF;AAED,cAAc;AAEd,IAAI,cAAc,EAAE,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -7,7 +7,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
const path_1 = __importDefault(require("path"));
|
|
10
|
-
const logger_1 = __importDefault(require("../common/logger"));
|
|
11
10
|
const ib_api_next_app_1 = require("./common/ib-api-next-app");
|
|
12
11
|
/////////////////////////////////////////////////////////////////////////////////
|
|
13
12
|
// Help text and command line parsing //
|
|
@@ -15,21 +14,7 @@ const ib_api_next_app_1 = require("./common/ib-api-next-app");
|
|
|
15
14
|
const DESCRIPTION_TEXT = "Prints the timestamp of earliest available historical data for a contract.";
|
|
16
15
|
const USAGE_TEXT = "Usage: get-head-timestamp.js <options>";
|
|
17
16
|
const OPTION_ARGUMENTS = [
|
|
18
|
-
|
|
19
|
-
["symbol=<name>", "The symbol name."],
|
|
20
|
-
[
|
|
21
|
-
"sectype=<type>",
|
|
22
|
-
"The security type. Valid values: STK, OPT, FUT, IND, FOP, CFD, CASH, BAG, BOND, CMDTY, NEWS and FUND",
|
|
23
|
-
],
|
|
24
|
-
["exchange=<name>", "The destination exchange name."],
|
|
25
|
-
["currency=<currency>", "The contract currency."],
|
|
26
|
-
[
|
|
27
|
-
"expiry=<YYYYMM>",
|
|
28
|
-
"The contract's last trading day or contract month (for Options and Futures)." +
|
|
29
|
-
"Strings with format YYYYMM will be interpreted as the Contract Month whereas YYYYMMDD will be interpreted as Last Trading Day.",
|
|
30
|
-
],
|
|
31
|
-
["strike=<number>", "The option's strike price."],
|
|
32
|
-
["right=<P|C>", " The option type. Valid values are P, PUT, C, CALL."],
|
|
17
|
+
...ib_api_next_app_1.IBApiNextApp.DEFAULT_CONTRACT_OPTIONS,
|
|
33
18
|
];
|
|
34
19
|
const EXAMPLE_TEXT = "get-head-timestamp.js -symbol=AMZN -sectype=STK -currency=USD -exchange=SMART -conid=3691937 -port=4002";
|
|
35
20
|
//////////////////////////////////////////////////////////////////////////////
|
|
@@ -43,30 +28,26 @@ class PrintHeadTimestampApp extends ib_api_next_app_1.IBApiNextApp {
|
|
|
43
28
|
* Start the app.
|
|
44
29
|
*/
|
|
45
30
|
start() {
|
|
46
|
-
var _a, _b;
|
|
47
31
|
const scriptName = path_1.default.basename(__filename);
|
|
48
|
-
|
|
49
|
-
this.connect(
|
|
32
|
+
this.info(`Starting ${scriptName} script`);
|
|
33
|
+
this.connect();
|
|
50
34
|
// print next unused order id
|
|
51
35
|
this.api
|
|
52
|
-
.getHeadTimestamp(
|
|
53
|
-
symbol: this.cmdLineArgs.symbol,
|
|
54
|
-
conId: (_a = this.cmdLineArgs.conid) !== null && _a !== void 0 ? _a : undefined,
|
|
55
|
-
secType: this.cmdLineArgs.sectype,
|
|
56
|
-
exchange: this.cmdLineArgs.exchange,
|
|
57
|
-
currency: this.cmdLineArgs.currency,
|
|
58
|
-
lastTradeDateOrContractMonth: this.cmdLineArgs.expiry,
|
|
59
|
-
strike: (_b = this.cmdLineArgs.strike) !== null && _b !== void 0 ? _b : undefined,
|
|
60
|
-
right: this.cmdLineArgs.right,
|
|
61
|
-
}, "TRADES", true, 1)
|
|
36
|
+
.getHeadTimestamp(this.getContractArg(), "TRADES", true, 1)
|
|
62
37
|
.then((timestamp) => {
|
|
63
38
|
this.printText(timestamp);
|
|
64
|
-
this.
|
|
39
|
+
this.stop();
|
|
65
40
|
})
|
|
66
41
|
.catch((err) => {
|
|
67
42
|
this.error(`getHeadTimestamp failed with '${err.error.message}'`);
|
|
68
43
|
});
|
|
69
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Stop the app with success code.
|
|
47
|
+
*/
|
|
48
|
+
stop() {
|
|
49
|
+
this.exit();
|
|
50
|
+
}
|
|
70
51
|
}
|
|
71
52
|
// run the app
|
|
72
53
|
new PrintHeadTimestampApp().start();
|