@stoqey/ib 1.3.9 → 1.3.10
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 +3 -3
- package/dist/api/api.d.ts +58 -55
- package/dist/api/api.js +50 -44
- package/dist/api/api.js.map +1 -1
- package/dist/api/contract/contract.d.ts +4 -0
- package/dist/api/contract/wsh.d.ts +15 -0
- package/dist/api/contract/wsh.js +21 -0
- package/dist/api/contract/wsh.js.map +1 -0
- package/dist/api/data/enum/fad-data-type.d.ts +2 -1
- package/dist/api/data/enum/fad-data-type.js +2 -1
- package/dist/api/data/enum/fad-data-type.js.map +1 -1
- package/dist/api/data/enum/min-server-version.d.ts +3 -1
- package/dist/api/data/enum/min-server-version.js +2 -0
- package/dist/api/data/enum/min-server-version.js.map +1 -1
- package/dist/api/data/enum/sec-type.d.ts +22 -13
- package/dist/api/data/enum/sec-type.js +23 -14
- package/dist/api/data/enum/sec-type.js.map +1 -1
- package/dist/api/historical/what-to-show.d.ts +21 -0
- package/dist/api/historical/what-to-show.js +25 -0
- package/dist/api/historical/what-to-show.js.map +1 -0
- package/dist/api/market/tickType.d.ts +12 -0
- package/dist/api/market/tickType.js +12 -0
- package/dist/api/market/tickType.js.map +1 -1
- package/dist/api/order/enum/orderType.d.ts +4 -0
- package/dist/api/order/enum/orderType.js +23 -1
- package/dist/api/order/enum/orderType.js.map +1 -1
- package/dist/api/order/enum/tif.d.ts +30 -0
- package/dist/api/order/enum/tif.js +33 -0
- package/dist/api/order/enum/tif.js.map +1 -0
- package/dist/api/order/execution.d.ts +1 -0
- package/dist/api/order/order.d.ts +21 -6
- package/dist/api/order/order.js +2 -0
- package/dist/api/order/order.js.map +1 -1
- package/dist/api/order/stop.d.ts +3 -2
- package/dist/api/order/stop.js +2 -1
- package/dist/api/order/stop.js.map +1 -1
- package/dist/api/order/stopLimit.d.ts +3 -2
- package/dist/api/order/stopLimit.js +2 -1
- package/dist/api/order/stopLimit.js.map +1 -1
- package/dist/api/order/trailingStop.d.ts +4 -3
- package/dist/api/order/trailingStop.js +2 -1
- package/dist/api/order/trailingStop.js.map +1 -1
- package/dist/api-next/api-next.d.ts +8 -6
- package/dist/api-next/api-next.js +7 -5
- package/dist/api-next/api-next.js.map +1 -1
- package/dist/api-next/market-scanner/market-scanner.d.ts +0 -5
- package/dist/api-next/market-scanner/market-scanner.js +5 -5
- package/dist/api-next/market-scanner/market-scanner.js.map +1 -1
- package/dist/common/errorCode.d.ts +4 -1
- package/dist/common/errorCode.js +4 -0
- package/dist/common/errorCode.js.map +1 -1
- package/dist/core/io/decoder.d.ts +12 -6
- package/dist/core/io/decoder.js +79 -57
- package/dist/core/io/decoder.js.map +1 -1
- package/dist/core/io/encoder.d.ts +9 -7
- package/dist/core/io/encoder.js +98 -13
- package/dist/core/io/encoder.js.map +1 -1
- package/dist/index.d.ts +8 -6
- package/dist/index.js +12 -7
- package/dist/index.js.map +1 -1
- package/dist/tests/unit/api/api.test.js +22 -22
- package/dist/tests/unit/api/api.test.js.map +1 -1
- package/dist/tests/unit/api/connect.test.js +11 -9
- package/dist/tests/unit/api/connect.test.js.map +1 -1
- package/dist/tests/unit/api/contract-details.test.d.ts +1 -0
- package/dist/tests/unit/api/contract-details.test.js +114 -0
- package/dist/tests/unit/api/contract-details.test.js.map +1 -0
- package/dist/tests/unit/api/market-data.test.js +16 -13
- package/dist/tests/unit/api/market-data.test.js.map +1 -1
- package/dist/tests/unit/api/market-scanner.test.d.ts +1 -0
- package/dist/tests/unit/api/market-scanner.test.js +71 -0
- package/dist/tests/unit/api/market-scanner.test.js.map +1 -0
- package/dist/tests/unit/api/matching-symbols.test.js +33 -24
- package/dist/tests/unit/api/matching-symbols.test.js.map +1 -1
- package/dist/tests/unit/api/order/cancelOrder.test.d.ts +1 -0
- package/dist/tests/unit/api/order/cancelOrder.test.js +86 -0
- package/dist/tests/unit/api/order/cancelOrder.test.js.map +1 -0
- package/dist/tests/unit/api/order/placeOrder.test.js +69 -92
- package/dist/tests/unit/api/order/placeOrder.test.js.map +1 -1
- package/dist/tests/unit/api/order/reqAllOpenOrders.test.js +10 -7
- package/dist/tests/unit/api/order/reqAllOpenOrders.test.js.map +1 -1
- package/dist/tests/unit/api/wsh-event-data.test.d.ts +1 -0
- package/dist/tests/unit/api/wsh-event-data.test.js +113 -0
- package/dist/tests/unit/api/wsh-event-data.test.js.map +1 -0
- package/dist/tests/unit/api-next/get-all-open-orders.test.js +1 -2
- package/dist/tests/unit/api-next/get-all-open-orders.test.js.map +1 -1
- package/dist/tests/unit/api-next/get-head-timestamp.test.js +1 -1
- package/dist/tests/unit/api-next/get-head-timestamp.test.js.map +1 -1
- package/dist/tests/unit/api-next/get-historical-data-updates.test.js +1 -1
- package/dist/tests/unit/api-next/get-historical-data-updates.test.js.map +1 -1
- package/dist/tests/unit/api-next/get-historical-data.test.js +2 -2
- package/dist/tests/unit/api-next/get-historical-data.test.js.map +1 -1
- package/dist/tests/unit/api-next/{search-contracts.test.js → get-matching-symbols.js} +3 -3
- package/dist/tests/unit/api-next/get-matching-symbols.js.map +1 -0
- package/dist/tools/get-head-timestamp.js +2 -1
- package/dist/tools/get-head-timestamp.js.map +1 -1
- package/dist/tools/historical-data-updates.js +2 -1
- package/dist/tools/historical-data-updates.js.map +1 -1
- package/dist/tools/historical-data.js +2 -1
- package/dist/tools/historical-data.js.map +1 -1
- package/dist/tools/search-contracts.js +1 -1
- package/dist/tools/search-contracts.js.map +1 -1
- package/package.json +1 -1
- package/dist/tests/unit/api-next/search-contracts.test.js.map +0 -1
- /package/dist/tests/unit/api-next/{search-contracts.test.d.ts → get-matching-symbols.d.ts} +0 -0
|
@@ -202,6 +202,8 @@ export declare enum TickType {
|
|
|
202
202
|
DELAYED_LAST_TIMESTAMP = 88,
|
|
203
203
|
/** Number of shares available to short (TWS Build 974+ is required) */
|
|
204
204
|
SHORTABLE_SHARES = 89,
|
|
205
|
+
DELAYED_HALTED = 90,
|
|
206
|
+
REUTERS_2_MUTUAL_FUNDS = 91,
|
|
205
207
|
/**
|
|
206
208
|
* Today's closing price of ETF's Net Asset Value (NAV).
|
|
207
209
|
* Calculation is based on prices of ETF's underlying securities.
|
|
@@ -234,6 +236,16 @@ export declare enum TickType {
|
|
|
234
236
|
ETF_NAV_HIGH = 98,
|
|
235
237
|
/** The low price of ETF's Net Asset Value (NAV). */
|
|
236
238
|
ETF_NAV_LOW = 99,
|
|
239
|
+
/** TBD */
|
|
240
|
+
SOCIAL_MARKET_ANALYTICS = 100,
|
|
241
|
+
/** Midpoint is calculated based on IPO price range */
|
|
242
|
+
ESTIMATED_IPO_MIDPOINT = 101,
|
|
243
|
+
/** Final price for IPO */
|
|
244
|
+
FINAL_IPO_LAST = 102,
|
|
245
|
+
/** TBD */
|
|
246
|
+
DELAYED_YIELD_BID = 103,
|
|
247
|
+
/** TBD */
|
|
248
|
+
DELAYED_YIELD_ASK = 104,
|
|
237
249
|
UNKNOWN = 2147483647
|
|
238
250
|
}
|
|
239
251
|
export default TickType;
|
|
@@ -207,6 +207,8 @@ var TickType;
|
|
|
207
207
|
TickType[TickType["DELAYED_LAST_TIMESTAMP"] = 88] = "DELAYED_LAST_TIMESTAMP";
|
|
208
208
|
/** Number of shares available to short (TWS Build 974+ is required) */
|
|
209
209
|
TickType[TickType["SHORTABLE_SHARES"] = 89] = "SHORTABLE_SHARES";
|
|
210
|
+
TickType[TickType["DELAYED_HALTED"] = 90] = "DELAYED_HALTED";
|
|
211
|
+
TickType[TickType["REUTERS_2_MUTUAL_FUNDS"] = 91] = "REUTERS_2_MUTUAL_FUNDS";
|
|
210
212
|
/**
|
|
211
213
|
* Today's closing price of ETF's Net Asset Value (NAV).
|
|
212
214
|
* Calculation is based on prices of ETF's underlying securities.
|
|
@@ -239,6 +241,16 @@ var TickType;
|
|
|
239
241
|
TickType[TickType["ETF_NAV_HIGH"] = 98] = "ETF_NAV_HIGH";
|
|
240
242
|
/** The low price of ETF's Net Asset Value (NAV). */
|
|
241
243
|
TickType[TickType["ETF_NAV_LOW"] = 99] = "ETF_NAV_LOW";
|
|
244
|
+
/** TBD */
|
|
245
|
+
TickType[TickType["SOCIAL_MARKET_ANALYTICS"] = 100] = "SOCIAL_MARKET_ANALYTICS";
|
|
246
|
+
/** Midpoint is calculated based on IPO price range */
|
|
247
|
+
TickType[TickType["ESTIMATED_IPO_MIDPOINT"] = 101] = "ESTIMATED_IPO_MIDPOINT";
|
|
248
|
+
/** Final price for IPO */
|
|
249
|
+
TickType[TickType["FINAL_IPO_LAST"] = 102] = "FINAL_IPO_LAST";
|
|
250
|
+
/** TBD */
|
|
251
|
+
TickType[TickType["DELAYED_YIELD_BID"] = 103] = "DELAYED_YIELD_BID";
|
|
252
|
+
/** TBD */
|
|
253
|
+
TickType[TickType["DELAYED_YIELD_ASK"] = 104] = "DELAYED_YIELD_ASK";
|
|
242
254
|
TickType[TickType["UNKNOWN"] = 2147483647] = "UNKNOWN";
|
|
243
255
|
})(TickType || (exports.TickType = TickType = {}));
|
|
244
256
|
exports.default = TickType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tickType.js","sourceRoot":"","sources":["../../../src/api/market/tickType.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,IAAY,
|
|
1
|
+
{"version":3,"file":"tickType.js","sourceRoot":"","sources":["../../../src/api/market/tickType.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,IAAY,QA8VX;AA9VD,WAAY,QAAQ;IAClB,4DAA4D;IAC5D,+CAAY,CAAA;IAEZ,2CAA2C;IAC3C,qCAAO,CAAA;IAEP,2CAA2C;IAC3C,qCAAO,CAAA;IAEP,4DAA4D;IAC5D,+CAAY,CAAA;IAEZ,+CAA+C;IAC/C,uCAAQ,CAAA;IAER,4DAA4D;IAC5D,iDAAa,CAAA;IAEb,8BAA8B;IAC9B,uCAAQ,CAAA;IAER,6BAA6B;IAC7B,qCAAO,CAAA;IAEP,wFAAwF;IACxF,2CAAU,CAAA;IAEV;;;;OAIG;IACH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T",
|
|
25
26
|
PEG_PRIM = "PEG PRIM",
|
|
@@ -43,4 +44,7 @@ export declare enum OrderType {
|
|
|
43
44
|
PEG_MKT_VOL = "PMV",
|
|
44
45
|
PEG_SRF_VOL = "PSV"
|
|
45
46
|
}
|
|
47
|
+
export declare const isPegBenchOrder: (orderType: OrderType) => boolean;
|
|
48
|
+
export declare const isPegBestOrder: (orderType: OrderType) => boolean;
|
|
49
|
+
export declare const isPegMidOrder: (orderType: OrderType) => boolean;
|
|
46
50
|
export default OrderType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OrderType = void 0;
|
|
3
|
+
exports.isPegMidOrder = exports.isPegBestOrder = exports.isPegBenchOrder = exports.OrderType = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Order types.
|
|
6
6
|
*/
|
|
@@ -24,6 +24,7 @@ var OrderType;
|
|
|
24
24
|
OrderType["MTL"] = "MTL";
|
|
25
25
|
OrderType["PASSV_REL"] = "PASSV REL";
|
|
26
26
|
OrderType["PEG_BENCH"] = "PEG BENCH";
|
|
27
|
+
OrderType["PEG_BEST"] = "PEG BEST";
|
|
27
28
|
OrderType["PEG_MID"] = "PEG MID";
|
|
28
29
|
OrderType["PEG_MKT"] = "PEG MKT";
|
|
29
30
|
OrderType["PEG_PRIM"] = "PEG PRIM";
|
|
@@ -47,5 +48,26 @@ var OrderType;
|
|
|
47
48
|
OrderType["PEG_MKT_VOL"] = "PMV";
|
|
48
49
|
OrderType["PEG_SRF_VOL"] = "PSV";
|
|
49
50
|
})(OrderType || (exports.OrderType = OrderType = {}));
|
|
51
|
+
const isPegBenchOrder = (orderType) => {
|
|
52
|
+
if (orderType == OrderType.PEG_BENCH || orderType == "PEGBENCH")
|
|
53
|
+
return true;
|
|
54
|
+
else
|
|
55
|
+
return false;
|
|
56
|
+
};
|
|
57
|
+
exports.isPegBenchOrder = isPegBenchOrder;
|
|
58
|
+
const isPegBestOrder = (orderType) => {
|
|
59
|
+
if (orderType == OrderType.PEG_BEST || orderType == "PEGBEST")
|
|
60
|
+
return true;
|
|
61
|
+
else
|
|
62
|
+
return false;
|
|
63
|
+
};
|
|
64
|
+
exports.isPegBestOrder = isPegBestOrder;
|
|
65
|
+
const isPegMidOrder = (orderType) => {
|
|
66
|
+
if (orderType == OrderType.PEG_MID || orderType == "PEGMID")
|
|
67
|
+
return true;
|
|
68
|
+
else
|
|
69
|
+
return false;
|
|
70
|
+
};
|
|
71
|
+
exports.isPegMidOrder = isPegMidOrder;
|
|
50
72
|
exports.default = OrderType;
|
|
51
73
|
//# sourceMappingURL=orderType.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orderType.js","sourceRoot":"","sources":["../../../../src/api/order/enum/orderType.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,
|
|
1
|
+
{"version":3,"file":"orderType.js","sourceRoot":"","sources":["../../../../src/api/order/enum/orderType.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,SA0CX;AA1CD,WAAY,SAAS;IACnB,sBAAS,CAAA;IACT,wBAAW,CAAA;IACX,wBAAW,CAAA;IACX,wBAAW,CAAA;IACX,gCAAmB,CAAA;IACnB,wBAAW,CAAA;IACX,4BAAe,CAAA;IACf,gCAAmB,CAAA;IACnB,sCAAyB,CAAA;IACzB,wBAAW,CAAA;IACX,uCAA0B,CAAA;IAC1B,wBAAW,CAAA;IACX,wBAAW,CAAA;IACX,gCAAmB,CAAA;IACnB,wBAAW,CAAA;IACX,wBAAW,CAAA;IACX,oCAAuB,CAAA;IACvB,oCAAuB,CAAA;IACvB,kCAAqB,CAAA;IACrB,gCAAmB,CAAA;IACnB,gCAAmB,CAAA;IACnB,kCAAqB,CAAA;IACrB,gCAAmB,CAAA;IACnB,uCAA0B,CAAA;IAC1B,uCAA0B,CAAA;IAC1B,kCAAqB,CAAA;IACrB,kCAAqB,CAAA;IACrB,oCAAuB,CAAA;IACvB,gCAAmB,CAAA;IACnB,wCAA2B,CAAA;IAC3B,oCAAuB,CAAA;IACvB,mDAAsC,CAAA;IACtC,oCAAuB,CAAA;IACvB,mDAAsC,CAAA;IACtC,wBAAW,CAAA;IACX,0BAAa,CAAA;IACb,4BAAe,CAAA;IACf,iCAAoB,CAAA;IACpB,gCAAmB,CAAA;IACnB,gCAAmB,CAAA;IACnB,gCAAmB,CAAA;AACrB,CAAC,EA1CW,SAAS,yBAAT,SAAS,QA0CpB;AAEM,MAAM,eAAe,GAAG,CAAC,SAAoB,EAAW,EAAE;IAC/D,IAAI,SAAS,IAAI,SAAS,CAAC,SAAS,IAAK,SAAoB,IAAI,UAAU;QACzE,OAAO,IAAI,CAAC;;QACT,OAAO,KAAK,CAAC;AACpB,CAAC,CAAC;AAJW,QAAA,eAAe,mBAI1B;AAEK,MAAM,cAAc,GAAG,CAAC,SAAoB,EAAW,EAAE;IAC9D,IAAI,SAAS,IAAI,SAAS,CAAC,QAAQ,IAAK,SAAoB,IAAI,SAAS;QACvE,OAAO,IAAI,CAAC;;QACT,OAAO,KAAK,CAAC;AACpB,CAAC,CAAC;AAJW,QAAA,cAAc,kBAIzB;AAEK,MAAM,aAAa,GAAG,CAAC,SAAoB,EAAW,EAAE;IAC7D,IAAI,SAAS,IAAI,SAAS,CAAC,OAAO,IAAK,SAAoB,IAAI,QAAQ;QACrE,OAAO,IAAI,CAAC;;QACT,OAAO,KAAK,CAAC;AACpB,CAAC,CAAC;AAJW,QAAA,aAAa,iBAIxB;AAEF,kBAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The time in force.
|
|
3
|
+
*
|
|
4
|
+
* Valid values are:
|
|
5
|
+
* DAY - Valid for the day only.
|
|
6
|
+
* GTC - Good until canceled. The order will continue to work within the system and in the marketplace until it executes or is canceled. GTC orders will be automatically be cancelled under the following conditions:
|
|
7
|
+
* If a corporate action on a security results in a stock split (forward or reverse), exchange for shares, or distribution of shares. If you do not log into your IB account for 90 days.
|
|
8
|
+
* At the end of the calendar quarter following the current quarter. For example, an order placed during the third quarter of 2011 will be canceled at the end of the first quarter of 2012. If the last day is a non-trading day, the cancellation will occur at the close of the final trading day of that quarter. For example, if the last day of the quarter is Sunday, the orders will be cancelled on the preceding Friday.
|
|
9
|
+
* Orders that are modified will be assigned a new “Auto Expire” date consistent with the end of the calendar quarter following the current quarter.
|
|
10
|
+
* Orders submitted to IB that remain in force for more than one day will not be reduced for dividends. To allow adjustment to your order price on ex-dividend date, consider using a Good-Til-Date/Time (GTD) or Good-after-Time/Date (GAT) order type, or a combination of the two.
|
|
11
|
+
* IOC - Immediate or Cancel. Any portion that is not filled as soon as it becomes available in the market is canceled.
|
|
12
|
+
* GTD - Good until Date. It will remain working within the system and in the marketplace until it executes or until the close of the market on the date specified
|
|
13
|
+
* OPG - Use OPG to send a market-on-open (MOO) or limit-on-open (LOO) order.
|
|
14
|
+
* FOK - If the entire Fill-or-Kill order does not execute as soon as it becomes available, the entire order is canceled.
|
|
15
|
+
* DTC - Day until Canceled.
|
|
16
|
+
*/
|
|
17
|
+
export declare const TimeInForce: {
|
|
18
|
+
readonly DAY: "DAY";
|
|
19
|
+
readonly GTC: "GTC";
|
|
20
|
+
readonly OPG: "OPG";
|
|
21
|
+
readonly IOC: "IOC";
|
|
22
|
+
readonly GTD: "GTD";
|
|
23
|
+
readonly GTT: "GTT";
|
|
24
|
+
readonly AUC: "AUC";
|
|
25
|
+
readonly FOK: "FOK";
|
|
26
|
+
readonly GTX: "GTX";
|
|
27
|
+
readonly DTC: "DTC";
|
|
28
|
+
readonly Minutes: "Minutes";
|
|
29
|
+
};
|
|
30
|
+
export type TimeInForce = (typeof TimeInForce)[keyof typeof TimeInForce];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The time in force.
|
|
4
|
+
*
|
|
5
|
+
* Valid values are:
|
|
6
|
+
* DAY - Valid for the day only.
|
|
7
|
+
* GTC - Good until canceled. The order will continue to work within the system and in the marketplace until it executes or is canceled. GTC orders will be automatically be cancelled under the following conditions:
|
|
8
|
+
* If a corporate action on a security results in a stock split (forward or reverse), exchange for shares, or distribution of shares. If you do not log into your IB account for 90 days.
|
|
9
|
+
* At the end of the calendar quarter following the current quarter. For example, an order placed during the third quarter of 2011 will be canceled at the end of the first quarter of 2012. If the last day is a non-trading day, the cancellation will occur at the close of the final trading day of that quarter. For example, if the last day of the quarter is Sunday, the orders will be cancelled on the preceding Friday.
|
|
10
|
+
* Orders that are modified will be assigned a new “Auto Expire” date consistent with the end of the calendar quarter following the current quarter.
|
|
11
|
+
* Orders submitted to IB that remain in force for more than one day will not be reduced for dividends. To allow adjustment to your order price on ex-dividend date, consider using a Good-Til-Date/Time (GTD) or Good-after-Time/Date (GAT) order type, or a combination of the two.
|
|
12
|
+
* IOC - Immediate or Cancel. Any portion that is not filled as soon as it becomes available in the market is canceled.
|
|
13
|
+
* GTD - Good until Date. It will remain working within the system and in the marketplace until it executes or until the close of the market on the date specified
|
|
14
|
+
* OPG - Use OPG to send a market-on-open (MOO) or limit-on-open (LOO) order.
|
|
15
|
+
* FOK - If the entire Fill-or-Kill order does not execute as soon as it becomes available, the entire order is canceled.
|
|
16
|
+
* DTC - Day until Canceled.
|
|
17
|
+
*/
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.TimeInForce = void 0;
|
|
20
|
+
exports.TimeInForce = {
|
|
21
|
+
DAY: "DAY",
|
|
22
|
+
GTC: "GTC",
|
|
23
|
+
OPG: "OPG",
|
|
24
|
+
IOC: "IOC",
|
|
25
|
+
GTD: "GTD",
|
|
26
|
+
GTT: "GTT",
|
|
27
|
+
AUC: "AUC",
|
|
28
|
+
FOK: "FOK",
|
|
29
|
+
GTX: "GTX",
|
|
30
|
+
DTC: "DTC",
|
|
31
|
+
Minutes: "Minutes",
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=tif.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tif.js","sourceRoot":"","sources":["../../../../src/api/order/enum/tif.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEU,QAAA,WAAW,GAAG;IACzB,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,SAAS;CACV,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import SoftDollarTier from "../data/container/soft-dollar-tier";
|
|
2
|
-
import TagValue from "../data/container/tag-value";
|
|
3
|
-
import OrderCondition from "./condition/order-condition";
|
|
4
|
-
import OrderAction from "./enum/order-action";
|
|
1
|
+
import { SoftDollarTier } from "../data/container/soft-dollar-tier";
|
|
2
|
+
import { TagValue } from "../data/container/tag-value";
|
|
3
|
+
import { OrderCondition } from "./condition/order-condition";
|
|
4
|
+
import { OrderAction } from "./enum/order-action";
|
|
5
5
|
import { OrderType } from "./enum/orderType";
|
|
6
|
+
import { TimeInForce } from "./enum/tif";
|
|
6
7
|
import { OrderComboLeg } from "./orderComboLeg";
|
|
7
8
|
/**
|
|
8
9
|
* The order's description.
|
|
@@ -67,7 +68,7 @@ export interface Order {
|
|
|
67
68
|
* - FOK - If the entire Fill-or-Kill order does not execute as soon as it becomes available, the entire order is canceled.
|
|
68
69
|
* - DTC - Day until Canceled
|
|
69
70
|
*/
|
|
70
|
-
tif?:
|
|
71
|
+
tif?: TimeInForce;
|
|
71
72
|
/** One-Cancels-All group identifier. */
|
|
72
73
|
ocaGroup?: string;
|
|
73
74
|
/**
|
|
@@ -176,7 +177,7 @@ export interface Order {
|
|
|
176
177
|
trailingPercent?: number;
|
|
177
178
|
/** The Financial Advisor group the trade will be allocated to. Use an empty string if not applicable. */
|
|
178
179
|
faGroup?: string;
|
|
179
|
-
/** The Financial Advisor allocation profile the trade will be allocated to. Use an empty string if not applicable. */
|
|
180
|
+
/** @deprecated The Financial Advisor allocation profile the trade will be allocated to. Use an empty string if not applicable. */
|
|
180
181
|
faProfile?: string;
|
|
181
182
|
/** The Financial Advisor allocation method the trade will be allocated to. Use an empty string if not applicable.FaMethod */
|
|
182
183
|
faMethod?: string;
|
|
@@ -600,6 +601,20 @@ export interface Order {
|
|
|
600
601
|
duration?: number;
|
|
601
602
|
/** Value must be positive, and it is number of seconds that SMART order would be parked for at IBKRATS before being routed to exchange. */
|
|
602
603
|
postToAts?: number;
|
|
604
|
+
/** Accepts a list with parameters obtained from advancedOrderRejectJson */
|
|
603
605
|
advancedErrorOverride?: string;
|
|
606
|
+
/** Used by brokers and advisors when manually entering, modifying or cancelling orders at the direction of a client. Only used when allocating orders to specific groups or accounts. Excluding "All" group. */
|
|
607
|
+
manualOrderTime?: string;
|
|
608
|
+
/** Defines the minimum trade quantity to fill. For IBKRATS orders. */
|
|
609
|
+
minTradeQty?: number;
|
|
610
|
+
/** Defines the minimum size to compete. For IBKRATS orders. */
|
|
611
|
+
minCompeteSize?: number;
|
|
612
|
+
/** Specifies the offset Off The Midpoint that will be applied to the order. For IBKRATS orders. */
|
|
613
|
+
competeAgainstBestOffset?: number;
|
|
614
|
+
/** This offset is applied when the spread is an even number of cents wide. This offset must be in whole-penny increments or zero. For IBKRATS orders. */
|
|
615
|
+
midOffsetAtWhole?: number;
|
|
616
|
+
/** This offset is applied when the spread is an odd number of cents wide. This offset must be in half-penny increments. For IBKRATS orders. */
|
|
617
|
+
midOffsetAtHalf?: number;
|
|
604
618
|
}
|
|
619
|
+
export declare const COMPETE_AGAINST_BEST_OFFSET_UP_TO_MID: number;
|
|
605
620
|
export default Order;
|
package/dist/api/order/order.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order.js","sourceRoot":"","sources":["../../../src/api/order/order.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"order.js","sourceRoot":"","sources":["../../../src/api/order/order.ts"],"names":[],"mappings":";;;AAyvBa,QAAA,qCAAqC,GAAG,QAAQ,CAAC"}
|
package/dist/api/order/stop.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import OrderAction from "./enum/order-action";
|
|
2
2
|
import { OrderType } from "./enum/orderType";
|
|
3
|
+
import { TimeInForce } from "./enum/tif";
|
|
3
4
|
/**
|
|
4
5
|
* Represents a stop order.
|
|
5
6
|
*/
|
|
@@ -9,8 +10,8 @@ export declare class StopOrder {
|
|
|
9
10
|
totalQuantity: number;
|
|
10
11
|
transmit?: boolean;
|
|
11
12
|
parentId?: number;
|
|
12
|
-
tif?:
|
|
13
|
-
constructor(action: OrderAction, auxPrice: number, totalQuantity: number, transmit?: boolean, parentId?: number, tif?:
|
|
13
|
+
tif?: TimeInForce;
|
|
14
|
+
constructor(action: OrderAction, auxPrice: number, totalQuantity: number, transmit?: boolean, parentId?: number, tif?: TimeInForce);
|
|
14
15
|
orderType: OrderType;
|
|
15
16
|
}
|
|
16
17
|
export default StopOrder;
|
package/dist/api/order/stop.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StopOrder = void 0;
|
|
4
4
|
const orderType_1 = require("./enum/orderType");
|
|
5
|
+
const tif_1 = require("./enum/tif");
|
|
5
6
|
/**
|
|
6
7
|
* Represents a stop order.
|
|
7
8
|
*/
|
|
@@ -16,7 +17,7 @@ class StopOrder {
|
|
|
16
17
|
this.orderType = orderType_1.OrderType.STP;
|
|
17
18
|
this.transmit = this.transmit ?? true;
|
|
18
19
|
this.parentId = this.parentId ?? 0;
|
|
19
|
-
this.tif = this.tif ??
|
|
20
|
+
this.tif = this.tif ?? tif_1.TimeInForce.DAY;
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
exports.StopOrder = StopOrder;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stop.js","sourceRoot":"","sources":["../../../src/api/order/stop.ts"],"names":[],"mappings":";;;AACA,gDAA6C;
|
|
1
|
+
{"version":3,"file":"stop.js","sourceRoot":"","sources":["../../../src/api/order/stop.ts"],"names":[],"mappings":";;;AACA,gDAA6C;AAC7C,oCAAyC;AAEzC;;GAEG;AACH,MAAa,SAAS;IACpB,YACS,MAAmB,EACnB,QAAgB,EAChB,aAAqB,EACrB,QAAkB,EAClB,QAAiB,EACjB,GAAiB;QALjB,WAAM,GAAN,MAAM,CAAa;QACnB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,kBAAa,GAAb,aAAa,CAAQ;QACrB,aAAQ,GAAR,QAAQ,CAAU;QAClB,aAAQ,GAAR,QAAQ,CAAS;QACjB,QAAG,GAAH,GAAG,CAAc;QAOnB,cAAS,GAAG,qBAAS,CAAC,GAAG,CAAC;QAL/B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC;QACtC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,iBAAW,CAAC,GAAG,CAAC;IACzC,CAAC;CAGF;AAfD,8BAeC;AAED,kBAAe,SAAS,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import OrderAction from "./enum/order-action";
|
|
2
2
|
import { OrderType } from "./enum/orderType";
|
|
3
|
+
import { TimeInForce } from "./enum/tif";
|
|
3
4
|
/**
|
|
4
5
|
* Represents a stop-limit order.
|
|
5
6
|
*/
|
|
@@ -10,8 +11,8 @@ export declare class StopLimitOrder {
|
|
|
10
11
|
totalQuantity?: boolean;
|
|
11
12
|
transmit?: boolean;
|
|
12
13
|
parentId?: number;
|
|
13
|
-
tif?:
|
|
14
|
-
constructor(action: OrderAction, lmtPrice: number, auxPrice: number, totalQuantity?: boolean, transmit?: boolean, parentId?: number, tif?:
|
|
14
|
+
tif?: TimeInForce;
|
|
15
|
+
constructor(action: OrderAction, lmtPrice: number, auxPrice: number, totalQuantity?: boolean, transmit?: boolean, parentId?: number, tif?: TimeInForce);
|
|
15
16
|
orderType: OrderType;
|
|
16
17
|
}
|
|
17
18
|
export default StopLimitOrder;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StopLimitOrder = void 0;
|
|
4
4
|
const orderType_1 = require("./enum/orderType");
|
|
5
|
+
const tif_1 = require("./enum/tif");
|
|
5
6
|
/**
|
|
6
7
|
* Represents a stop-limit order.
|
|
7
8
|
*/
|
|
@@ -17,7 +18,7 @@ class StopLimitOrder {
|
|
|
17
18
|
this.orderType = orderType_1.OrderType.STP_LMT;
|
|
18
19
|
this.transmit = this.transmit ?? true;
|
|
19
20
|
this.parentId = this.parentId ?? 0;
|
|
20
|
-
this.tif = this.tif ??
|
|
21
|
+
this.tif = this.tif ?? tif_1.TimeInForce.DAY;
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
exports.StopLimitOrder = StopLimitOrder;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stopLimit.js","sourceRoot":"","sources":["../../../src/api/order/stopLimit.ts"],"names":[],"mappings":";;;AACA,gDAA6C;
|
|
1
|
+
{"version":3,"file":"stopLimit.js","sourceRoot":"","sources":["../../../src/api/order/stopLimit.ts"],"names":[],"mappings":";;;AACA,gDAA6C;AAC7C,oCAAyC;AAEzC;;GAEG;AACH,MAAa,cAAc;IACzB,YACS,MAAmB,EACnB,QAAgB,EAChB,QAAgB,EAChB,aAAuB,EACvB,QAAkB,EAClB,QAAiB,EACjB,GAAiB;QANjB,WAAM,GAAN,MAAM,CAAa;QACnB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,kBAAa,GAAb,aAAa,CAAU;QACvB,aAAQ,GAAR,QAAQ,CAAU;QAClB,aAAQ,GAAR,QAAQ,CAAS;QACjB,QAAG,GAAH,GAAG,CAAc;QAOnB,cAAS,GAAG,qBAAS,CAAC,OAAO,CAAC;QALnC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC;QACtC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,iBAAW,CAAC,GAAG,CAAC;IACzC,CAAC;CAGF;AAhBD,wCAgBC;AAED,kBAAe,cAAc,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import OrderAction from "./enum/order-action";
|
|
1
|
+
import { OrderAction } from "./enum/order-action";
|
|
2
2
|
import { OrderType } from "./enum/orderType";
|
|
3
|
+
import { TimeInForce } from "./enum/tif";
|
|
3
4
|
/**
|
|
4
5
|
* Represents a trailing-stop order.
|
|
5
6
|
*/
|
|
@@ -10,7 +11,7 @@ export declare class TrailingStopOrder {
|
|
|
10
11
|
trailingPercent?: number;
|
|
11
12
|
transmit?: boolean;
|
|
12
13
|
parentId?: number;
|
|
13
|
-
tif?:
|
|
14
|
+
tif?: TimeInForce;
|
|
14
15
|
/**
|
|
15
16
|
* Create a trailing-stop order.
|
|
16
17
|
*
|
|
@@ -31,7 +32,7 @@ export declare class TrailingStopOrder {
|
|
|
31
32
|
* - DAY - Valid for the day only.
|
|
32
33
|
* - GTC - Good until canceled.
|
|
33
34
|
*/
|
|
34
|
-
constructor(action: OrderAction, totalQuantity: number, auxPrice?: number, trailingPercent?: number, transmit?: boolean, parentId?: number, tif?:
|
|
35
|
+
constructor(action: OrderAction, totalQuantity: number, auxPrice?: number, trailingPercent?: number, transmit?: boolean, parentId?: number, tif?: TimeInForce);
|
|
35
36
|
/** The order's type (must be [[OrderType.TRAIL]]). */
|
|
36
37
|
readonly orderType = OrderType.TRAIL;
|
|
37
38
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TrailingStopOrder = void 0;
|
|
4
4
|
const orderType_1 = require("./enum/orderType");
|
|
5
|
+
const tif_1 = require("./enum/tif");
|
|
5
6
|
/**
|
|
6
7
|
* Represents a trailing-stop order.
|
|
7
8
|
*/
|
|
@@ -38,7 +39,7 @@ class TrailingStopOrder {
|
|
|
38
39
|
this.orderType = orderType_1.OrderType.TRAIL;
|
|
39
40
|
this.transmit = this.transmit ?? true;
|
|
40
41
|
this.parentId = this.parentId ?? 0;
|
|
41
|
-
this.tif = this.tif ??
|
|
42
|
+
this.tif = this.tif ?? tif_1.TimeInForce.DAY;
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
exports.TrailingStopOrder = TrailingStopOrder;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trailingStop.js","sourceRoot":"","sources":["../../../src/api/order/trailingStop.ts"],"names":[],"mappings":";;;AACA,gDAA6C;
|
|
1
|
+
{"version":3,"file":"trailingStop.js","sourceRoot":"","sources":["../../../src/api/order/trailingStop.ts"],"names":[],"mappings":";;;AACA,gDAA6C;AAC7C,oCAAyC;AAEzC;;GAEG;AACH,MAAa,iBAAiB;IAC5B;;;;;;;;;;;;;;;;;;;OAmBG;IACH,YACS,MAAmB,EACnB,aAAqB,EACrB,QAAiB,EACjB,eAAwB,EACxB,QAAkB,EAClB,QAAiB,EACjB,GAAiB;QANjB,WAAM,GAAN,MAAM,CAAa;QACnB,kBAAa,GAAb,aAAa,CAAQ;QACrB,aAAQ,GAAR,QAAQ,CAAS;QACjB,oBAAe,GAAf,eAAe,CAAS;QACxB,aAAQ,GAAR,QAAQ,CAAU;QAClB,aAAQ,GAAR,QAAQ,CAAS;QACjB,QAAG,GAAH,GAAG,CAAc;QAO1B,sDAAsD;QACtC,cAAS,GAAG,qBAAS,CAAC,KAAK,CAAC;QAN1C,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC;QACtC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,iBAAW,CAAC,GAAG,CAAC;IACzC,CAAC;CAIF;AArCD,8CAqCC;AAED,kBAAe,iBAAiB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Observable, Subject } from "rxjs";
|
|
2
|
-
import { Bar, BarSizeSetting, CommissionReport, Contract, ContractDescription, ContractDetails, DepthMktDataDescription, DurationUnit, ExecutionDetail, ExecutionFilter, HistogramEntry, HistoricalTick, HistoricalTickBidAsk, HistoricalTickLast, OpenOrder, Order, OrderBookUpdate, ScannerSubscription, SecType, TagValue } from "../";
|
|
2
|
+
import { Bar, BarSizeSetting, CommissionReport, Contract, ContractDescription, ContractDetails, DepthMktDataDescription, DurationUnit, ExecutionDetail, ExecutionFilter, HistogramEntry, HistoricalTick, HistoricalTickBidAsk, HistoricalTickLast, OpenOrder, Order, OrderBookUpdate, ScannerSubscription, SecType, TagValue, WhatToShow } from "../";
|
|
3
3
|
import LogLevel from "../api/data/enum/log-level";
|
|
4
4
|
import { MutableMarketData } from "../core/api-next/api/market/mutable-market-data";
|
|
5
5
|
import { IBApiNextLogger } from "../core/api-next/logger";
|
|
@@ -172,7 +172,7 @@ export declare class IBApiNext {
|
|
|
172
172
|
* - AccruedCash — Total accrued cash value of stock, commodities and securities
|
|
173
173
|
* - BuyingPower — Buying power serves as a measurement of the dollar value of securities that one may purchase in a securities account without depositing additional funds
|
|
174
174
|
* - EquityWithLoanValue — Forms the basis for determining whether a client has the necessary assets to either initiate or maintain security positions. Cash + stocks + bonds + mutual funds
|
|
175
|
-
* -
|
|
175
|
+
* - PreviousDayEquityWithLoanValue — Marginable Equity with Loan value as of 16:00 ET the previous day
|
|
176
176
|
* - GrossPositionValue — The sum of the absolute value of all stock and equity option positions
|
|
177
177
|
* - RegTEquity — Regulation T equity for universal account
|
|
178
178
|
* - RegTMargin — Regulation T margin for universal account
|
|
@@ -395,7 +395,7 @@ export declare class IBApiNext {
|
|
|
395
395
|
* @param useRTH Use regular trading hours only, `true` for yes or `false` for no.
|
|
396
396
|
* @param formatDate Set to 1 to obtain the bars' time as yyyyMMdd HH:mm:ss, set to 2 to obtain it like system time format in seconds.
|
|
397
397
|
*/
|
|
398
|
-
getHeadTimestamp(contract: Contract, whatToShow:
|
|
398
|
+
getHeadTimestamp(contract: Contract, whatToShow: WhatToShow, useRTH: boolean, formatDate: number): Promise<string>;
|
|
399
399
|
/** historicalData event handler */
|
|
400
400
|
private readonly onHistoricalData;
|
|
401
401
|
/**
|
|
@@ -446,7 +446,7 @@ export declare class IBApiNext {
|
|
|
446
446
|
* @param useRTH Set to 0 to obtain the data which was also generated outside of the Regular Trading Hours, set to 1 to obtain only the RTH data
|
|
447
447
|
* @param formatDate Set to 1 to obtain the bars' time as yyyyMMdd HH:mm:ss, set to 2 to obtain it like system time format in seconds
|
|
448
448
|
*/
|
|
449
|
-
getHistoricalData(contract: Contract, endDateTime: string | undefined, durationStr: string, barSizeSetting: BarSizeSetting, whatToShow:
|
|
449
|
+
getHistoricalData(contract: Contract, endDateTime: string | undefined, durationStr: string, barSizeSetting: BarSizeSetting, whatToShow: WhatToShow, useRTH: number, formatDate: number): Promise<Bar[]>;
|
|
450
450
|
/** historicalDataUpdate event handler */
|
|
451
451
|
private readonly onHistoricalDataUpdate;
|
|
452
452
|
/**
|
|
@@ -483,7 +483,7 @@ export declare class IBApiNext {
|
|
|
483
483
|
* - REBATE_RATE
|
|
484
484
|
* @param formatDate Set to 1 to obtain the bars' time as yyyyMMdd HH:mm:ss, set to 2 to obtain it like system time format in seconds
|
|
485
485
|
*/
|
|
486
|
-
getHistoricalDataUpdates(contract: Contract, barSizeSetting: BarSizeSetting, whatToShow:
|
|
486
|
+
getHistoricalDataUpdates(contract: Contract, barSizeSetting: BarSizeSetting, whatToShow: WhatToShow, formatDate: number): Observable<Bar>;
|
|
487
487
|
/** historicalTicks event handler */
|
|
488
488
|
private readonly onHistoricalTicks;
|
|
489
489
|
/**
|
|
@@ -748,7 +748,9 @@ export declare class IBApiNext {
|
|
|
748
748
|
*
|
|
749
749
|
* @param pattern Either start of ticker symbol or (for larger strings) company name.
|
|
750
750
|
*/
|
|
751
|
-
|
|
751
|
+
getMatchingSymbols(pattern: string): Promise<ContractDescription[]>;
|
|
752
|
+
/** @deprecated use getMatchingSymbols instead */
|
|
753
|
+
searchContracts: (pattern: string) => Promise<ContractDescription[]>;
|
|
752
754
|
/** userInfo event handler. */
|
|
753
755
|
private readonly onUserInfo;
|
|
754
756
|
/**
|
|
@@ -1212,6 +1212,8 @@ class IBApiNext {
|
|
|
1212
1212
|
});
|
|
1213
1213
|
sub?.complete();
|
|
1214
1214
|
};
|
|
1215
|
+
/** @deprecated use getMatchingSymbols instead */
|
|
1216
|
+
this.searchContracts = this.getMatchingSymbols;
|
|
1215
1217
|
/** userInfo event handler. */
|
|
1216
1218
|
this.onUserInfo = (subscriptions, reqId, whiteBrandingId) => {
|
|
1217
1219
|
const sub = subscriptions.get(reqId);
|
|
@@ -1362,7 +1364,7 @@ class IBApiNext {
|
|
|
1362
1364
|
* - AccruedCash — Total accrued cash value of stock, commodities and securities
|
|
1363
1365
|
* - BuyingPower — Buying power serves as a measurement of the dollar value of securities that one may purchase in a securities account without depositing additional funds
|
|
1364
1366
|
* - EquityWithLoanValue — Forms the basis for determining whether a client has the necessary assets to either initiate or maintain security positions. Cash + stocks + bonds + mutual funds
|
|
1365
|
-
* -
|
|
1367
|
+
* - PreviousDayEquityWithLoanValue — Marginable Equity with Loan value as of 16:00 ET the previous day
|
|
1366
1368
|
* - GrossPositionValue — The sum of the absolute value of all stock and equity option positions
|
|
1367
1369
|
* - RegTEquity — Regulation T equity for universal account
|
|
1368
1370
|
* - RegTMargin — Regulation T margin for universal account
|
|
@@ -1734,7 +1736,7 @@ class IBApiNext {
|
|
|
1734
1736
|
getHistoricalTicksMid(contract, startDateTime, endDateTime, numberOfTicks, useRTH) {
|
|
1735
1737
|
return this.subscriptions
|
|
1736
1738
|
.register((reqId) => {
|
|
1737
|
-
this.api.reqHistoricalTicks(reqId, contract, startDateTime, endDateTime, numberOfTicks,
|
|
1739
|
+
this.api.reqHistoricalTicks(reqId, contract, startDateTime, endDateTime, numberOfTicks, __1.WhatToShow.MIDPOINT, useRTH, false);
|
|
1738
1740
|
}, undefined, [[__1.EventName.historicalTicks, this.onHistoricalTicks]], undefined)
|
|
1739
1741
|
.pipe((0, operators_1.map)((v) => v.all));
|
|
1740
1742
|
}
|
|
@@ -1754,7 +1756,7 @@ class IBApiNext {
|
|
|
1754
1756
|
getHistoricalTicksBidAsk(contract, startDateTime, endDateTime, numberOfTicks, useRTH, ignoreSize) {
|
|
1755
1757
|
return this.subscriptions
|
|
1756
1758
|
.register((reqId) => {
|
|
1757
|
-
this.api.reqHistoricalTicks(reqId, contract, startDateTime, endDateTime, numberOfTicks,
|
|
1759
|
+
this.api.reqHistoricalTicks(reqId, contract, startDateTime, endDateTime, numberOfTicks, __1.WhatToShow.BID_ASK, useRTH, ignoreSize);
|
|
1758
1760
|
}, undefined, [[__1.EventName.historicalTicksBidAsk, this.onHistoricalTicksBidAsk]], undefined)
|
|
1759
1761
|
.pipe((0, operators_1.map)((v) => v.all));
|
|
1760
1762
|
}
|
|
@@ -1773,7 +1775,7 @@ class IBApiNext {
|
|
|
1773
1775
|
getHistoricalTicksLast(contract, startDateTime, endDateTime, numberOfTicks, useRTH) {
|
|
1774
1776
|
return this.subscriptions
|
|
1775
1777
|
.register((reqId) => {
|
|
1776
|
-
this.api.reqHistoricalTicks(reqId, contract, startDateTime, endDateTime, numberOfTicks,
|
|
1778
|
+
this.api.reqHistoricalTicks(reqId, contract, startDateTime, endDateTime, numberOfTicks, __1.WhatToShow.TRADES, useRTH, false);
|
|
1777
1779
|
}, undefined, [[__1.EventName.historicalTicksLast, this.onHistoricalTicksLast]], undefined)
|
|
1778
1780
|
.pipe((0, operators_1.map)((v) => v.all));
|
|
1779
1781
|
}
|
|
@@ -2020,7 +2022,7 @@ class IBApiNext {
|
|
|
2020
2022
|
*
|
|
2021
2023
|
* @param pattern Either start of ticker symbol or (for larger strings) company name.
|
|
2022
2024
|
*/
|
|
2023
|
-
|
|
2025
|
+
getMatchingSymbols(pattern) {
|
|
2024
2026
|
return (0, rxjs_1.lastValueFrom)(this.subscriptions
|
|
2025
2027
|
.register((reqId) => {
|
|
2026
2028
|
this.api.reqMatchingSymbols(reqId, pattern);
|