Keyboard Shortcuts
Likes
Search
Re: Order Id in error messages
Just tried this and I cannot reproduce what you describe. Maybe you can provide an example of the failure you experience. Before I describe what I did, let me address the document you cite. I was not aware of this IBKR Campus course (is that the correct term ?). I generally like it since it gives newcomers to TWS API a nice overview of how various pieces fit together. Having said that, I consider it "second hand" information about TWS API. Better than "I read that on Facebook" but not authoritative. When in doubt, I look at sources in this order for authoritative information:
The IBKR Campus document seems to be pretty new (Oct 9 this year?) so it may still have some V1.00 errors. I do not know what an "error stream" is when they describe the error callback parameter reqId with "The request identifier corresponding to the most recent reqId that maintained the error stream". Also, the first parameter for the error callback is called "id" and not "reqid" in the source code and the official TWS API Guide. Anyway. Here is what I tried:
Error. Id: 10, Code: 200, Msg: No security definition has been found for the request I then created an ESZ3 position in the paper account for a second set of tests. Again, the client received the correct error message with the correct orderId as id parameter followed by pnl() callbacks for the ESZ3 position11:26:30.420 [Thread-2] INFO? Error. Id: 10, Code: 200, Msg: No security definition has been found for the request?? ????
11:26:30.783 [Thread-2] INFO? Daily PnL Single. Req Id: 12345678, pos: 1, daily PnL: -14.5, unrealizedPnL: -14.5, realizedPnL: , value: 209300
11:26:31.671 [Thread-2] INFO? Daily PnL Single. Req Id: 12345678, pos: 1, daily PnL: -10.3, unrealizedPnL: -10.30, realizedPnL: , value: 209304
11:26:32.673 [Thread-2] INFO? Daily PnL Single. Req Id: 12345678, pos: 1, daily PnL: -2, unrealizedPnL: -2, realizedPnL: , value: 209312.5
´³¨¹°ù²µ±ð²Ô API log taken by TWS for the second test. The first looke exactly the same just without pnl() callbacks: 11:26:30:129 -> ---9-1-1-
11:26:30:131 -> ---15-1-DUxxxxxx-
11:26:30:132 -> ---4-2--1-2104-Market data farm connection is OK:usfuture.nj--
11:26:30:133 -> ---94-2--1-2104-Market data farm connection is OK:usfarm.nj--
11:26:30:138 -> ---84-2--1-2104-Market data farm connection is OK:usfuture--
11:26:30:139 -> ---64-2--1-2104-Market data farm connection is OK:eufarm--
11:26:30:139 -> ---84-2--1-2104-Market data farm connection is OK:cashfarm--
11:26:30:139 -> ---64-2--1-2104-Market data farm connection is OK:usfarm--
11:26:30:139 -> ---44-2--1-2106-HMDS data farm connection is OK:euhmds--
11:26:30:139 -> ---74-2--1-2106-HMDS data farm connection is OK:ushmds.nj--
11:26:30:139 -> ---44-2--1-2106-HMDS data farm connection is OK:ushmds--
11:26:30:139 -> ---94-2--1-2158-Sec-def data farm connection is OK:secdefnj--
11:26:30:291 <- 3-10-0-ES-FUT--0.0---CME---ESH3----BUY-1-MKT---GTC---- ...
11:26:30:291 <- 94-12345678-DUxxxxxx--495512552-
11:26:30:305 -> ---4-2-10-200-No security definition has been found for the request--
11:26:30:637 -> ---95-12345678-1--14.5--14.5-1.7976931348623157E308-209300.0-
11:26:31:557 -> ---95-12345678-1--10.30078125--10.30078125-1.7976931348623157E308-209304.19921875-
11:26:32:557 -> ---95-12345678-1--2.0--2.0-1.7976931348623157E308-209312.5-
11:26:35:559 -> ---95-12345678-1-10.5-10.5-1.7976931348623157E308-209325.0-
11:26:36:559 -> ---95-12345678-1-23.0-23.0-1.7976931348623157E308-209337.5-
11:26:38:560 -> ---95-12345678-1-35.5-35.5-1.7976931348623157E308-209350.0-
On Tue, Oct 31, 2023 at 06:19 AM, bespalex wrote:
On Mon, Oct 30, 2023 at 09:35 AM, ´³¨¹°ù²µ±ð²Ô Reinold wrote: |