Keyboard Shortcuts
Likes
- Twsapi
- Messages
Search
two questions about the 50 msg/sec rate limit
Regarding the 50 msg/sec TWS rate limitation, is IBKR checking it by calculating a continuously sliding window, or are they doing a nonoverlapping time window? The first is stricter.
?
If it's the second one, then theoretically you can send up to 100 messages in? a short burst. As long as the first fifty were near the end of the first window, and the next 50 were at the beginning of the next window.?
?
If this was an option, then there would be the challenge of trying to figure out where TWS' clock was. Does anyone know if the calculation is made in TWS before orders are sent out over the wire, or are the calculations made upon receipt at the data center? |
||||
Error using TWS scanner to filter stocks
Hi, I've created a script that uses the TWS scanner to filter stocks for a strategy but I'm receiving this error: "Error 162, reqId 5: Historical Market Data Service error message:API scanner subscription cancelled: 5"
?
?
Has anyone experienced this/knows how to deal with this or what I'm missing?
?
? |
||||
Re: VSTOXX daily settlement prices
I don't know of a source for the settlement data either, and scraping web pages is never a reliable path. One approach could be to calculate/estimate the settlement price yourself. Both going forward on a daily basis as well as historical values for a couple years at least. The specification for the future gives you the recipe at The daily settlement prices for the current maturity month are derived from the volume-weighted average of the prices of all transactions during the minute before 17:30 CET (reference point), provided that more than five trades transacted within this period. Just grab historical TickByTickLast for the timeframe [17:29, 17:30) and calculate the VWAP. Probably rounded to the minTick of EU0.05 since the published values allways end in 5 or 0. As a "proof of concept", here the results for yesterday:
Just a thought.
´³¨¹°ù²µ±ð²Ô
? ?
On Tue, Feb 25, 2025 at 03:42 AM, Despair wrote:
|
||||
Web API no Info
Hi together,
?
I'm not quite sure if this is the right group, because there are two API options (via TWS and via Client Portal API). ?I am looking for?
https://www.interactivebrokers.com/campus/trading-lessons/requesting-market-data/ and can also retrieve conid's for given symbols.
But if I now use? /iserver/secdef/info/ to retrieve data for a symbol I only get Error 404 - File not found Does this perhaps only work if you have paid for market data? Otherwise there is only cash on my securities account...? ?
Best regards
joh
|
||||
Re: TWS 10.33 and 10.34 crashing on Windows and Mac OS
Replying to myself with the feedback that I have received from IB:
"Please be informed that the minimum system requirement for TWS on PC is Windows 10 on higher. We are not supporting errors on Windows 7. Based on your report you are using Mac OS 10.14.6 which has been released in 2018. Minimum operating system requirement to run TWS on a MAC is MAC OS 11. Please update your Mac OS on the latest version if it is possible and try again. Please take care that you are installing the correct version for your Intel or Apple Silicon Processor." These issues are very likely caused by older operating systems no longer being supported by current Java versions. -- |
||||
Closing SELL order being treated as SHORT order in the api
Has anyone else had this occur to them for stock trades?: I take a long position, and then try to close out the position (as a in a stop-loss situation), and the closing SELL order is treated as a SHORT order, occasionally resulting in a security being 'hard to borrow' and not being able to close out my position!? This is a little unnerving... I don't seem to have this problem doing things 'by hand', just with orders via the API. I'm looking through the documentation to see if there's some 'closing trade' flag I can stick on an order, but it looks like 'BUY' and 'SELL' are my only options as far as side or 'action' as it's called in the docs. I DID see this, but it's only for institutional clients:
any help would be appreciated!? thanks https://interactivebrokers.github.io/tws-api/classIBApi_1_1Order.html |
||||
Re: "438 : The application is now locked" and "326 : Unable to connect as the client id is already in use..." discontinued ?
When you say "using on old API client", do you have a feel for what API level that client supports? Do you still have the API source code? I always run TWS/IBGW with "never lock", so that I cannot speak to error 438. Does the error message actually come from TWS (as in TWS records a message in the API log?) or does the API in the client assume TWS is locked based upon how the socket gets closed? The earliest Java API I have used is 9.73.04 (API level 134) from 2017 and I have never seen error 326 upon clients attempting to connect with duplicate clientIDs. I always had client-side error 502 that is somewhat unspecific since it gets raised whenever the socket gets closed by TWS/IBGW or the operating system. As you can see from the flow below, TWS/IGBW simply close the socket when the client sends a"StartAPI" message that contains a duplicate clientID. So I am wondering, whether your "old" client API locally raises error 326 upon socket closure after "StartAPI". I had thought about a patch like that for my framework since a more prescriptive error code would make a lot of sense in cases of duplicate clientIDs.
? ?
On Thu, Feb 20, 2025 at 07:04 AM, Orionn wrote:
Can anyone confirm that the errors in the subject have been discontinued in recent API versions ? |
||||
Re: "438 : The application is now locked" and "326 : Unable to connect as the client id is already in use..." discontinued ?
Which API language and operating system has your client used for your tests?
?
?
On Thu, Feb 20, 2025 at 07:04 AM, Orionn wrote:
Can anyone confirm that the errors in the subject have been discontinued in recent API versions ? |
||||
TWS 10.33 and 10.34 crashing on Windows and Mac OS
I am seeing crashes with TWS versions 10.33 and 10.34 on Windows and Mac OS.
TWS versions 10.33 and 10.34 are crashing on Windows 7 when exiting TWS. Windows displays a pop-up with "Trader Workstation stopped working" error. TWS version 10.34 crashes on Mac OS X 10.14.6 right when it is starting. Identifier: com.install4j.5556-0173-2810-3400.22; Crashed Thread: 4 Java: JTS-Main; Exception Type: EXC_BAD_ACCESS (SIGABRT); Exception Codes: EXC_I386_GPFLT; Exception Note: EXC_CORPSE_NOTIFY Is anyone else experiencing crashes and/or instability with TWS versions 10.33 and up on Windows and Mac OS ? -- |
||||
"438 : The application is now locked" and "326 : Unable to connect as the client id is already in use..." discontinued ?
Can anyone confirm that the errors in the subject have been discontinued in recent API versions ?
I have performed the following tests: 1) TWS locked: - using an old API client to connect to TWS 10.19 or 10.34 correctly shows "438 : The application is now locked" - using an API 10.34 client to connect to TWS 10.19 or 10.34 shows: "502 | Couldn't connect to TWS. Confirm that "Enable ActiveX and Socket Clients" is enabled ..." 2) client Id already in use: - using an old API client to connect to TWS 10.19 or 10.34 correctly shows "326 : Unable to connect as the client id is already in use. Retry with a unique client id." - using an API 10.34 client to connect to TWS 10.19 or TWS 10.34 shows: "502 | Couldn't connect to TWS. Confirm that "Enable ActiveX and Socket Clients" is enabled ..." So it is clear that the issue is in the API, not in TWS. The most recent TWS API versions do not provide the correct error message and instead always trigger error 502 in both scenarios of locked TWS and client Id already in use. Can anyone confirm these findings ? -- |
||||
Re: Auto Restart & Auto Login w/ IB Gateway and Linux
Hi Brendan. See this:? I think it's done by some members of this forum. Thank them ;) On Mon, Feb 17, 2025 at 9:17?PM Brendan Lydon via <blydon12=[email protected]> wrote:
--
Daniel |