@stoqey/ib
Advanced tools
Comparing version 1.3.24 to 1.3.25
@@ -16,3 +16,3 @@ "use strict"; | ||
/** Maximum supported version. */ | ||
exports.MAX_SUPPORTED_SERVER_VERSION = min_server_version_1.default.PENDING_PRICE_REVISION; | ||
exports.MAX_SUPPORTED_SERVER_VERSION = min_server_version_1.default.PROFESSIONAL_CUSTOMER; | ||
/** Minimum supported version. */ | ||
@@ -19,0 +19,0 @@ exports.MIN_SERVER_VER_SUPPORTED = 38; |
@@ -21,2 +21,4 @@ import OptionType from "../data/enum/option-type"; | ||
lastTradeDateOrContractMonth?: string; | ||
/** The contract's last trading day. */ | ||
lastTradeDate?: string; | ||
/** The option's strike price. */ | ||
@@ -23,0 +25,0 @@ strike?: number; |
import TagValue from "../data/container/tag-value"; | ||
import SecType from "../data/enum/sec-type"; | ||
import { Contract } from "./contract"; | ||
import { FundAssetType, FundDistributionPolicyIndicator } from "./fund"; | ||
/** | ||
@@ -252,3 +253,20 @@ * Extended contract details. | ||
suggestedSizeIncrement?: number; | ||
fundName?: string; | ||
fundFamily?: string; | ||
fundType?: string; | ||
fundFrontLoad?: string; | ||
fundBackLoad?: string; | ||
fundBackLoadTimeInterval?: string; | ||
fundManagementFee?: string; | ||
fundClosed?: boolean; | ||
fundClosedForNewInvestors?: boolean; | ||
fundClosedForNewMoney?: boolean; | ||
fundNotifyAmount?: string; | ||
fundMinimumInitialPurchase?: string; | ||
fundSubsequentMinimumPurchase?: string; | ||
fundBlueSkyStates?: string; | ||
fundBlueSkyTerritories?: string; | ||
fundDistributionPolicyIndicator?: FundDistributionPolicyIndicator; | ||
fundAssetType?: FundAssetType; | ||
} | ||
export default ContractDetails; |
@@ -125,4 +125,10 @@ /** | ||
FA_PROFILE_DESUPPORT = 177, | ||
PENDING_PRICE_REVISION = 178 | ||
PENDING_PRICE_REVISION = 178, | ||
FUND_DATA_FIELDS = 179, | ||
MANUAL_ORDER_TIME_EXERCISE_OPTIONS = 180, | ||
OPEN_ORDER_AD_STRATEGY = 181, | ||
LAST_TRADE_DATE = 182, | ||
CUSTOMER_ACCOUNT = 183, | ||
PROFESSIONAL_CUSTOMER = 184 | ||
} | ||
export default MIN_SERVER_VER; |
@@ -131,4 +131,10 @@ "use strict"; | ||
MIN_SERVER_VER[MIN_SERVER_VER["PENDING_PRICE_REVISION"] = 178] = "PENDING_PRICE_REVISION"; | ||
MIN_SERVER_VER[MIN_SERVER_VER["FUND_DATA_FIELDS"] = 179] = "FUND_DATA_FIELDS"; | ||
MIN_SERVER_VER[MIN_SERVER_VER["MANUAL_ORDER_TIME_EXERCISE_OPTIONS"] = 180] = "MANUAL_ORDER_TIME_EXERCISE_OPTIONS"; | ||
MIN_SERVER_VER[MIN_SERVER_VER["OPEN_ORDER_AD_STRATEGY"] = 181] = "OPEN_ORDER_AD_STRATEGY"; | ||
MIN_SERVER_VER[MIN_SERVER_VER["LAST_TRADE_DATE"] = 182] = "LAST_TRADE_DATE"; | ||
MIN_SERVER_VER[MIN_SERVER_VER["CUSTOMER_ACCOUNT"] = 183] = "CUSTOMER_ACCOUNT"; | ||
MIN_SERVER_VER[MIN_SERVER_VER["PROFESSIONAL_CUSTOMER"] = 184] = "PROFESSIONAL_CUSTOMER"; | ||
})(MIN_SERVER_VER || (exports.MIN_SERVER_VER = MIN_SERVER_VER = {})); | ||
exports.default = MIN_SERVER_VER; | ||
//# sourceMappingURL=min-server-version.js.map |
@@ -20,3 +20,4 @@ /** | ||
readonly SCHEDULE: "SCHEDULE"; | ||
readonly AGGTRADES: "AGGTRADES"; | ||
}; | ||
export type WhatToShow = (typeof WhatToShow)[keyof typeof WhatToShow]; |
@@ -24,3 +24,4 @@ "use strict"; | ||
SCHEDULE: "SCHEDULE", | ||
AGGTRADES: "AGGTRADES", | ||
}; | ||
//# sourceMappingURL=what-to-show.js.map |
@@ -47,2 +47,3 @@ /** | ||
} | ||
export declare const isVolOrder: (orderType: OrderType) => boolean; | ||
export declare const isPegBenchOrder: (orderType: OrderType) => boolean; | ||
@@ -49,0 +50,0 @@ export declare const isPegBestOrder: (orderType: OrderType) => boolean; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isPegMidOrder = exports.isPegBestOrder = exports.isPegBenchOrder = exports.OrderType = void 0; | ||
exports.isPegMidOrder = exports.isPegBestOrder = exports.isPegBenchOrder = exports.isVolOrder = exports.OrderType = void 0; | ||
/** | ||
@@ -51,2 +51,4 @@ * Order types. | ||
})(OrderType || (exports.OrderType = OrderType = {})); | ||
const isVolOrder = (orderType) => orderType == OrderType.VOL; | ||
exports.isVolOrder = isVolOrder; | ||
const isPegBenchOrder = (orderType) => { | ||
@@ -53,0 +55,0 @@ if (orderType == OrderType.PEG_BENCH || orderType == "PEGBENCH") |
@@ -618,4 +618,7 @@ import { SoftDollarTier } from "../data/container/soft-dollar-tier"; | ||
midOffsetAtHalf?: number; | ||
customerAccount?: string; | ||
professionalCustomer?: boolean; | ||
} | ||
export declare const COMPETE_AGAINST_BEST_OFFSET_UP_TO_MID: number; | ||
export declare const isCompeteAgainstBestOffsetUpToMid: (order: Order) => boolean; | ||
export default Order; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.COMPETE_AGAINST_BEST_OFFSET_UP_TO_MID = void 0; | ||
exports.isCompeteAgainstBestOffsetUpToMid = exports.COMPETE_AGAINST_BEST_OFFSET_UP_TO_MID = void 0; | ||
exports.COMPETE_AGAINST_BEST_OFFSET_UP_TO_MID = Infinity; | ||
const isCompeteAgainstBestOffsetUpToMid = (order) => order.competeAgainstBestOffset === exports.COMPETE_AGAINST_BEST_OFFSET_UP_TO_MID; | ||
exports.isCompeteAgainstBestOffsetUpToMid = isCompeteAgainstBestOffsetUpToMid; | ||
//# sourceMappingURL=order.js.map |
@@ -154,34 +154,47 @@ /** | ||
FAIL_SEND_REQHEADTIMESTAMP = 566, | ||
/** Cancel Head Time Stamp Sending Error. */ | ||
FAIL_SEND_CANHEADTIMESTAMP = 567, | ||
/** CRequest Histogram Data Sending Error */ | ||
FAIL_SEND_REQHISTOGRAMDATA = 567, | ||
/** Request Market Rule Sending Error. */ | ||
FAIL_SEND_REQMARKETRULE = 568, | ||
/** Request PnL Sending Error. */ | ||
FAIL_SEND_REQPNL = 566, | ||
/** Cancel PnL Sending Error. */ | ||
FAIL_SEND_CANPNL = 567, | ||
/** Request PnL Single Sending Error. */ | ||
FAIL_SEND_REQPNL_SINGLE = 568, | ||
FAIL_SEND_CANCELHISTOGRAMDATA = 568, | ||
/** Cancel PnL Single Sending Error. */ | ||
FAIL_SEND_CANPNL_SINGLE = 569, | ||
FAIL_SEND_CANCELHEADTIMESTAMP = 569, | ||
/** Request Historical Ticks Sending Error. */ | ||
FAIL_SEND_HISTORICAL_TICK = 569, | ||
/** Request Tick-By-Tick Sending Error. */ | ||
FAIL_SEND_REQTICKBYTICK = 570, | ||
/** Cancel Tick-By-Tick Sending Error. */ | ||
FAIL_SEND_CANTICKBYTICK = 571, | ||
/** Request Completed Orders Sending Error. */ | ||
FAIL_SEND_REQ_COMPLETED_ORDERS = 572, | ||
/** Request WSH Meta Data Sending Error. */ | ||
FAIL_SEND_REQ_WSH_META_DATA = 573, | ||
/** Request Market Rule Sending Error. */ | ||
FAIL_SEND_REQMARKETRULE = 570, | ||
/** Request PnL Sending Error. */ | ||
FAIL_SEND_REQPNL = 571, | ||
/** Cancel PnL Sending Error. */ | ||
FAIL_SEND_CANCELPNL = 572, | ||
/** Request PnL Single Error. */ | ||
FAIL_SEND_REQPNLSINGLE = 573, | ||
/** Cancel PnL Single Sending Error . */ | ||
FAIL_SEND_CANCELPNLSINGLE = 574, | ||
/** Request Historical Ticks Error. */ | ||
FAIL_SEND_REQHISTORICALTICKS = 575, | ||
/** Request Tick-By-Tick Data Sending Error */ | ||
FAIL_SEND_REQTICKBYTICKDATA = 576, | ||
/** Cancel Tick-By-Tick Data Sending Error */ | ||
FAIL_SEND_CANCELTICKBYTICKDATA = 577, | ||
/** Request Completed Orders Sending Error */ | ||
FAIL_SEND_REQCOMPLETEDORDERS = 578, | ||
/** Invalid symbol in string */ | ||
INVALID_SYMBOL = 579, | ||
/** "Request WSH Meta Data Sending Error */ | ||
FAIL_SEND_REQ_WSH_META_DATA = 580, | ||
/** Cancel WSH Meta Data Sending Error */ | ||
FAIL_SEND_CAN_WSH_META_DATA = 574, | ||
FAIL_SEND_CAN_WSH_META_DATA = 581, | ||
/** Request WSH Event Data Sending Error */ | ||
FAIL_SEND_REQ_WSH_EVENT_DATA = 575, | ||
FAIL_SEND_REQ_WSH_EVENT_DATA = 582, | ||
/** Cancel WSH Event Data Sending Error */ | ||
FAIL_SEND_CAN_WSH_EVENT_DATA = 576, | ||
INVALID_SYMBOL = 579, | ||
FAIL_SEND_CAN_WSH_EVENT_DATA = 583, | ||
/** Request User Info Sending Error */ | ||
FAIL_SEND_REQ_USER_INFO = 584, | ||
/** FA Profile is not supported anymore, use FA Group instead */ | ||
FA_PROFILE_NOT_SUPPORTED = 585, | ||
/** Part of requested market data is not subscribed. */ | ||
PART_OF_REQUESTED_DATA_NOT_SUBSCRIBED = 10090, | ||
/** Requested market data is not subscribed. Displaying delayed market data. */ | ||
DISPLAYING_DELAYED_DATA = 10167, | ||
NEWS_FEED_NOT_ALLOWED = 10276 | ||
} |
@@ -159,35 +159,45 @@ "use strict"; | ||
ErrorCode[ErrorCode["FAIL_SEND_REQHEADTIMESTAMP"] = 566] = "FAIL_SEND_REQHEADTIMESTAMP"; | ||
/** Cancel Head Time Stamp Sending Error. */ | ||
ErrorCode[ErrorCode["FAIL_SEND_CANHEADTIMESTAMP"] = 567] = "FAIL_SEND_CANHEADTIMESTAMP"; | ||
/** CRequest Histogram Data Sending Error */ | ||
ErrorCode[ErrorCode["FAIL_SEND_REQHISTOGRAMDATA"] = 567] = "FAIL_SEND_REQHISTOGRAMDATA"; | ||
/** Request Market Rule Sending Error. */ | ||
ErrorCode[ErrorCode["FAIL_SEND_REQMARKETRULE"] = 568] = "FAIL_SEND_REQMARKETRULE"; | ||
/** Request PnL Sending Error. */ | ||
ErrorCode[ErrorCode["FAIL_SEND_REQPNL"] = 566] = "FAIL_SEND_REQPNL"; | ||
/** Cancel PnL Sending Error. */ | ||
ErrorCode[ErrorCode["FAIL_SEND_CANPNL"] = 567] = "FAIL_SEND_CANPNL"; | ||
/** Request PnL Single Sending Error. */ | ||
ErrorCode[ErrorCode["FAIL_SEND_REQPNL_SINGLE"] = 568] = "FAIL_SEND_REQPNL_SINGLE"; | ||
ErrorCode[ErrorCode["FAIL_SEND_CANCELHISTOGRAMDATA"] = 568] = "FAIL_SEND_CANCELHISTOGRAMDATA"; | ||
/** Cancel PnL Single Sending Error. */ | ||
ErrorCode[ErrorCode["FAIL_SEND_CANPNL_SINGLE"] = 569] = "FAIL_SEND_CANPNL_SINGLE"; | ||
ErrorCode[ErrorCode["FAIL_SEND_CANCELHEADTIMESTAMP"] = 569] = "FAIL_SEND_CANCELHEADTIMESTAMP"; | ||
/** Request Historical Ticks Sending Error. */ | ||
ErrorCode[ErrorCode["FAIL_SEND_HISTORICAL_TICK"] = 569] = "FAIL_SEND_HISTORICAL_TICK"; | ||
/** Request Tick-By-Tick Sending Error. */ | ||
ErrorCode[ErrorCode["FAIL_SEND_REQTICKBYTICK"] = 570] = "FAIL_SEND_REQTICKBYTICK"; | ||
/** Cancel Tick-By-Tick Sending Error. */ | ||
ErrorCode[ErrorCode["FAIL_SEND_CANTICKBYTICK"] = 571] = "FAIL_SEND_CANTICKBYTICK"; | ||
/** Request Completed Orders Sending Error. */ | ||
ErrorCode[ErrorCode["FAIL_SEND_REQ_COMPLETED_ORDERS"] = 572] = "FAIL_SEND_REQ_COMPLETED_ORDERS"; | ||
/** Request WSH Meta Data Sending Error. */ | ||
ErrorCode[ErrorCode["FAIL_SEND_REQ_WSH_META_DATA"] = 573] = "FAIL_SEND_REQ_WSH_META_DATA"; | ||
/** Request Market Rule Sending Error. */ | ||
ErrorCode[ErrorCode["FAIL_SEND_REQMARKETRULE"] = 570] = "FAIL_SEND_REQMARKETRULE"; | ||
/** Request PnL Sending Error. */ | ||
ErrorCode[ErrorCode["FAIL_SEND_REQPNL"] = 571] = "FAIL_SEND_REQPNL"; | ||
/** Cancel PnL Sending Error. */ | ||
ErrorCode[ErrorCode["FAIL_SEND_CANCELPNL"] = 572] = "FAIL_SEND_CANCELPNL"; | ||
/** Request PnL Single Error. */ | ||
ErrorCode[ErrorCode["FAIL_SEND_REQPNLSINGLE"] = 573] = "FAIL_SEND_REQPNLSINGLE"; | ||
/** Cancel PnL Single Sending Error . */ | ||
ErrorCode[ErrorCode["FAIL_SEND_CANCELPNLSINGLE"] = 574] = "FAIL_SEND_CANCELPNLSINGLE"; | ||
/** Request Historical Ticks Error. */ | ||
ErrorCode[ErrorCode["FAIL_SEND_REQHISTORICALTICKS"] = 575] = "FAIL_SEND_REQHISTORICALTICKS"; | ||
/** Request Tick-By-Tick Data Sending Error */ | ||
ErrorCode[ErrorCode["FAIL_SEND_REQTICKBYTICKDATA"] = 576] = "FAIL_SEND_REQTICKBYTICKDATA"; | ||
/** Cancel Tick-By-Tick Data Sending Error */ | ||
ErrorCode[ErrorCode["FAIL_SEND_CANCELTICKBYTICKDATA"] = 577] = "FAIL_SEND_CANCELTICKBYTICKDATA"; | ||
/** Request Completed Orders Sending Error */ | ||
ErrorCode[ErrorCode["FAIL_SEND_REQCOMPLETEDORDERS"] = 578] = "FAIL_SEND_REQCOMPLETEDORDERS"; | ||
/** Invalid symbol in string */ | ||
ErrorCode[ErrorCode["INVALID_SYMBOL"] = 579] = "INVALID_SYMBOL"; | ||
/** "Request WSH Meta Data Sending Error */ | ||
ErrorCode[ErrorCode["FAIL_SEND_REQ_WSH_META_DATA"] = 580] = "FAIL_SEND_REQ_WSH_META_DATA"; | ||
/** Cancel WSH Meta Data Sending Error */ | ||
ErrorCode[ErrorCode["FAIL_SEND_CAN_WSH_META_DATA"] = 574] = "FAIL_SEND_CAN_WSH_META_DATA"; | ||
ErrorCode[ErrorCode["FAIL_SEND_CAN_WSH_META_DATA"] = 581] = "FAIL_SEND_CAN_WSH_META_DATA"; | ||
/** Request WSH Event Data Sending Error */ | ||
ErrorCode[ErrorCode["FAIL_SEND_REQ_WSH_EVENT_DATA"] = 575] = "FAIL_SEND_REQ_WSH_EVENT_DATA"; | ||
ErrorCode[ErrorCode["FAIL_SEND_REQ_WSH_EVENT_DATA"] = 582] = "FAIL_SEND_REQ_WSH_EVENT_DATA"; | ||
/** Cancel WSH Event Data Sending Error */ | ||
ErrorCode[ErrorCode["FAIL_SEND_CAN_WSH_EVENT_DATA"] = 576] = "FAIL_SEND_CAN_WSH_EVENT_DATA"; | ||
/* Invalid symbol in string */ | ||
ErrorCode[ErrorCode["INVALID_SYMBOL"] = 579] = "INVALID_SYMBOL"; | ||
/* Part of requested market data is not subscribed. */ | ||
ErrorCode[ErrorCode["FAIL_SEND_CAN_WSH_EVENT_DATA"] = 583] = "FAIL_SEND_CAN_WSH_EVENT_DATA"; | ||
/** Request User Info Sending Error */ | ||
ErrorCode[ErrorCode["FAIL_SEND_REQ_USER_INFO"] = 584] = "FAIL_SEND_REQ_USER_INFO"; | ||
/** FA Profile is not supported anymore, use FA Group instead */ | ||
ErrorCode[ErrorCode["FA_PROFILE_NOT_SUPPORTED"] = 585] = "FA_PROFILE_NOT_SUPPORTED"; | ||
/** Part of requested market data is not subscribed. */ | ||
ErrorCode[ErrorCode["PART_OF_REQUESTED_DATA_NOT_SUBSCRIBED"] = 10090] = "PART_OF_REQUESTED_DATA_NOT_SUBSCRIBED"; | ||
/* Requested market data is not subscribed. Displaying delayed market data. */ | ||
/** Requested market data is not subscribed. Displaying delayed market data. */ | ||
ErrorCode[ErrorCode["DISPLAYING_DELAYED_DATA"] = 10167] = "DISPLAYING_DELAYED_DATA"; | ||
@@ -194,0 +204,0 @@ /* News feed is not allowed. */ |
@@ -125,5 +125,4 @@ import { EventName } from "../../api/data/enum/event-name"; | ||
* Returns 0 if the token is empty. | ||
* Returns undefined is the token is Number.MAX_VALUE. | ||
*/ | ||
readInt(): number | undefined; | ||
readInt(): number; | ||
/** | ||
@@ -135,7 +134,7 @@ * Read a token from queue and return it as integer value. | ||
*/ | ||
readIntMax(): number; | ||
readIntMax: () => number | undefined; | ||
/** | ||
* Read a token from queue and return it as integer value. | ||
* | ||
* Returns undefined if the token is empty or Number.MAX_VALUE. | ||
* Returns undefined if the token is empty or `2147483647`. | ||
*/ | ||
@@ -464,17 +463,2 @@ readIntOrUndefined(): number | undefined; | ||
/** | ||
* Decode a [[Contract]] object from data queue. | ||
* @deprecated to remove | ||
*/ | ||
private decodeContract; | ||
/** | ||
* Decode a [[Order]] object from data queue. | ||
* @deprecated to remove | ||
*/ | ||
private decodeOrder; | ||
/** | ||
* Decode a [[ComboLeg]] object from data queue. | ||
* @deprecated to remove | ||
*/ | ||
private decodeComboLeg; | ||
/** | ||
* Read last trade date, parse it and assign to proper [[ContractDetails]] attributes. | ||
@@ -481,0 +465,0 @@ */ |
@@ -5,3 +5,3 @@ import { MarketDataType, WhatToShow } from "../.."; | ||
import TagValue from "../../api/data/container/tag-value"; | ||
import FADataType from "../../api/data/enum/fad-data-type"; | ||
import FADataType from "../../api/data/enum/fa-data-type"; | ||
import LogLevel from "../../api/data/enum/log-level"; | ||
@@ -228,3 +228,3 @@ import OptionExerciseAction from "../../api/data/enum/option-exercise-action"; | ||
*/ | ||
exerciseOptions(tickerId: number, contract: Contract, exerciseAction: OptionExerciseAction, exerciseQuantity: number, account: string, override: number): void; | ||
exerciseOptions(tickerId: number, contract: Contract, exerciseAction: OptionExerciseAction, exerciseQuantity: number, account: string, override: number, manualOrderTime?: string, customerAccount?: string, professionalCustomer?: boolean): void; | ||
/** | ||
@@ -231,0 +231,0 @@ * Encode a PLACE_ORDER message to an array of tokens. |
@@ -52,3 +52,3 @@ /** | ||
export { EventName } from "./api/data/enum/event-name"; | ||
export { FADataType } from "./api/data/enum/fad-data-type"; | ||
export { FADataType } from "./api/data/enum/fa-data-type"; | ||
export { LogLevel } from "./api/data/enum/log-level"; | ||
@@ -55,0 +55,0 @@ export { MIN_SERVER_VER } from "./api/data/enum/min-server-version"; |
@@ -75,4 +75,4 @@ "use strict"; | ||
Object.defineProperty(exports, "EventName", { enumerable: true, get: function () { return event_name_1.EventName; } }); | ||
var fad_data_type_1 = require("./api/data/enum/fad-data-type"); | ||
Object.defineProperty(exports, "FADataType", { enumerable: true, get: function () { return fad_data_type_1.FADataType; } }); | ||
var fa_data_type_1 = require("./api/data/enum/fa-data-type"); | ||
Object.defineProperty(exports, "FADataType", { enumerable: true, get: function () { return fa_data_type_1.FADataType; } }); | ||
var log_level_1 = require("./api/data/enum/log-level"); | ||
@@ -79,0 +79,0 @@ Object.defineProperty(exports, "LogLevel", { enumerable: true, get: function () { return log_level_1.LogLevel; } }); |
@@ -36,5 +36,3 @@ "use strict"; | ||
it("Twice the same event callback bug", (done) => { | ||
// Two active subscriptions for the same Event #193 | ||
done("Please fix issue #193"); | ||
return; | ||
// Two active subscriptions for the same Event issue #193 | ||
subscription$ = api.getOpenOrders().subscribe({ | ||
@@ -61,8 +59,4 @@ next: (data) => { | ||
}); | ||
// awaitTimeout(15).then(() => { | ||
// subscription$.unsubscribe(); | ||
// done(); | ||
// }); | ||
}); | ||
}); | ||
//# sourceMappingURL=subscription-registry.test.js.map |
@@ -226,3 +226,56 @@ "use strict"; | ||
}); | ||
test("Issue #203", (done) => { | ||
let refId; | ||
const refContract = { | ||
conId: 708846212, | ||
exchange: "CME", | ||
symbol: "MES", | ||
}; | ||
const refOrder = { | ||
action: __1.OrderAction.BUY, | ||
lmtPrice: 1, | ||
totalQuantity: 1, | ||
transmit: true, | ||
orderType: __1.OrderType.LMT, | ||
account: "DU5784856", | ||
tif: "DAY", | ||
orderRef: "RS/3/9", | ||
}; | ||
let isDone = false; | ||
ib.once(__1.EventName.nextValidId, (orderId) => { | ||
refId = orderId; | ||
ib.placeOrder(refId, refContract, refOrder); | ||
}) | ||
.on(__1.EventName.openOrder, (orderId, contract, order, _orderState) => { | ||
if (orderId == refId && !isDone) { | ||
isDone = true; | ||
expect(contract.symbol).toEqual(refContract.symbol); | ||
expect(order.totalQuantity).toEqual(refOrder.totalQuantity); | ||
done(); | ||
} | ||
}) | ||
.on(__1.EventName.error, (error, code, reqId, _advancedOrderReject) => { | ||
if (reqId === -1) { | ||
logger_1.default.info(error.message); | ||
} | ||
else { | ||
const msg = `[${reqId}] ${error.message} (Error #${code})`; | ||
if (error.message.includes("Warning:") || | ||
error.message.includes("Order Message:")) { | ||
logger_1.default.warn(msg); | ||
} | ||
else if (code == __1.ErrorCode.NO_TRADING_PERMISSIONS) { | ||
// Ignore this error for tests | ||
logger_1.default.warn(msg); | ||
done(); | ||
} | ||
else { | ||
ib.disconnect(); | ||
done(msg); | ||
} | ||
} | ||
}); | ||
ib.connect().reqOpenOrders(); | ||
}); | ||
}); | ||
//# sourceMappingURL=placeOrder.test.js.map |
{ | ||
"name": "@stoqey/ib", | ||
"version": "1.3.24", | ||
"version": "1.3.25", | ||
"private": false, | ||
@@ -80,7 +80,7 @@ "description": "Interactive Brokers TWS/IB Gateway API client library for Node.js (TS)", | ||
"@types/source-map-support": "^0.5.10", | ||
"@typescript-eslint/eslint-plugin": "^7.1.1", | ||
"@typescript-eslint/parser": "^7.1.1", | ||
"@typescript-eslint/eslint-plugin": "^7.13.0", | ||
"@typescript-eslint/parser": "^7.13.0", | ||
"ajv": "^8.16.0", | ||
"eslint": "^8.57.0", | ||
"eslint-plugin-jest": "^27.9.0", | ||
"eslint-plugin-jest": "^28.6.0", | ||
"eslint-plugin-rxjs": "^5.0.3", | ||
@@ -90,3 +90,3 @@ "jest": "^29.7.0", | ||
"jest-junit": "^16.0.0", | ||
"ts-jest": "^29.1.4", | ||
"ts-jest": "^29.1.5", | ||
"typedoc": "^0.25.13", | ||
@@ -93,0 +93,0 @@ "typescript": "^5.4.5" |
@@ -14,3 +14,3 @@ <div align="center"> | ||
`@stoqey/ib` is an [Interactive Brokers](http://interactivebrokers.com/) TWS (or IB Gateway) Typescript API client library for [Node.js](http://nodejs.org/). It is a direct port of Interactive Brokers' Java Client Version 10.25 ("latest") from Sept 7 2023. | ||
`@stoqey/ib` is an [Interactive Brokers](http://interactivebrokers.com/) TWS (or IB Gateway) Typescript API client library for [Node.js](http://nodejs.org/). It is a port of Interactive Brokers' Java Client Version 10.29.01 ("latest") from June 18th, 2024. | ||
@@ -17,0 +17,0 @@ Refer to the [Trader Workstation API](https://interactivebrokers.github.io/tws-api/) for the official documentation and the C#/Java/VB/C++/Python client. |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1670517
585
27193