@stoqey/ib
Advanced tools
Comparing version 1.3.22 to 1.3.23
@@ -463,2 +463,3 @@ import { EventName } from "../../api/data/enum/event-name"; | ||
* Decode a [[Contract]] object from data queue. | ||
* @deprecated to remove | ||
*/ | ||
@@ -468,2 +469,3 @@ private decodeContract; | ||
* Decode a [[Order]] object from data queue. | ||
* @deprecated to remove | ||
*/ | ||
@@ -473,2 +475,3 @@ private decodeOrder; | ||
* Decode a [[ComboLeg]] object from data queue. | ||
* @deprecated to remove | ||
*/ | ||
@@ -475,0 +478,0 @@ private decodeComboLeg; |
@@ -53,3 +53,3 @@ "use strict"; | ||
refId = orderId; | ||
ib.placeOrder(refId, refContract, refOrder); | ||
ib.placeOrder(refId, refContract, refOrder).reqOpenOrders(); | ||
}) | ||
@@ -80,3 +80,3 @@ .on(__1.EventName.openOrder, (orderId, contract, order, _orderState) => { | ||
}); | ||
ib.connect().reqOpenOrders(); | ||
ib.connect(); | ||
}); | ||
@@ -100,3 +100,3 @@ test("placeOrder with ExecutionCondition", (done) => { | ||
refId = orderId; | ||
ib.placeOrder(refId, refContract, refOrder); | ||
ib.placeOrder(refId, refContract, refOrder).reqOpenOrders(); | ||
}) | ||
@@ -127,3 +127,3 @@ .on(__1.EventName.openOrder, (orderId, contract, order, _orderState) => { | ||
}); | ||
ib.connect().reqOpenOrders(); | ||
ib.connect(); | ||
}); | ||
@@ -147,3 +147,3 @@ test("placeOrder with MarginCondition", (done) => { | ||
refId = orderId; | ||
ib.placeOrder(refId, refContract, refOrder); | ||
ib.placeOrder(refId, refContract, refOrder).reqOpenOrders(); | ||
}) | ||
@@ -174,3 +174,3 @@ .on(__1.EventName.openOrder, (orderId, contract, order, _orderState) => { | ||
}); | ||
ib.connect().reqOpenOrders(); | ||
ib.connect(); | ||
}); | ||
@@ -194,3 +194,3 @@ test("placeOrder with PercentChangeCondition", (done) => { | ||
refId = orderId; | ||
ib.placeOrder(refId, refContract, refOrder); | ||
ib.placeOrder(refId, refContract, refOrder).reqOpenOrders(); | ||
}) | ||
@@ -221,3 +221,3 @@ .on(__1.EventName.openOrder, (orderId, contract, order, _orderState) => { | ||
}); | ||
ib.connect().reqOpenOrders(); | ||
ib.connect(); | ||
}); | ||
@@ -241,12 +241,17 @@ test("placeOrder with TimeCondition", (done) => { | ||
refId = orderId; | ||
ib.placeOrder(refId, refContract, refOrder); | ||
ib.placeOrder(refId, refContract, refOrder).reqOpenOrders(); | ||
}) | ||
.on(__1.EventName.openOrder, (orderId, contract, order, _orderState) => { | ||
if (orderId == refId && !isDone) { | ||
if (orderId == refId) { | ||
isDone = true; | ||
expect(contract.symbol).toEqual(refContract.symbol); | ||
expect(order.totalQuantity).toEqual(refOrder.totalQuantity); | ||
done(); | ||
} | ||
}) | ||
.on(__1.EventName.openOrderEnd, () => { | ||
if (isDone) | ||
done(); | ||
else | ||
done("failed"); | ||
}) | ||
.on(__1.EventName.error, (error, code, reqId, _advancedOrderReject) => { | ||
@@ -268,3 +273,3 @@ if (reqId === -1) { | ||
}); | ||
ib.connect().reqOpenOrders(); | ||
ib.connect(); | ||
}); | ||
@@ -288,3 +293,3 @@ test("placeOrder with VolumeCondition", (done) => { | ||
refId = orderId; | ||
ib.placeOrder(refId, refContract, refOrder); | ||
ib.placeOrder(refId, refContract, refOrder).reqOpenOrders(); | ||
}) | ||
@@ -315,3 +320,3 @@ .on(__1.EventName.openOrder, (orderId, contract, order, _orderState) => { | ||
}); | ||
ib.connect().reqOpenOrders(); | ||
ib.connect(); | ||
}); | ||
@@ -342,3 +347,3 @@ test("placeOrder with all conditions", (done) => { | ||
refId = orderId; | ||
ib.placeOrder(refId, refContract, refOrder); | ||
ib.placeOrder(refId, refContract, refOrder).reqOpenOrders(); | ||
}) | ||
@@ -369,5 +374,5 @@ .on(__1.EventName.openOrder, (orderId, contract, order, _orderState) => { | ||
}); | ||
ib.connect().reqOpenOrders(); | ||
ib.connect(); | ||
}); | ||
}); | ||
//# sourceMappingURL=placeConditionalOrder.test.js.map |
{ | ||
"name": "@stoqey/ib", | ||
"version": "1.3.22", | ||
"version": "1.3.23", | ||
"private": false, | ||
@@ -78,7 +78,7 @@ "description": "Interactive Brokers TWS/IB Gateway API client library for Node.js (TS)", | ||
"@types/jest": "^29.5.12", | ||
"@types/node": "^18.19.33", | ||
"@types/node": "^18.19.34", | ||
"@types/source-map-support": "^0.5.10", | ||
"@typescript-eslint/eslint-plugin": "^7.1.1", | ||
"@typescript-eslint/parser": "^7.1.1", | ||
"ajv": "^8.13.0", | ||
"ajv": "^8.16.0", | ||
"eslint": "^8.57.0", | ||
@@ -90,3 +90,3 @@ "eslint-plugin-jest": "^27.9.0", | ||
"jest-junit": "^16.0.0", | ||
"ts-jest": "^29.1.2", | ||
"ts-jest": "^29.1.4", | ||
"typedoc": "^0.25.13", | ||
@@ -93,0 +93,0 @@ "typescript": "^5.4.5" |
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
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
1663730
27081