Support Board
Date/Time: Fri, 10 Jan 2025 13:53:42 +0000
Post From: Message to Interactive Brokers about Position Updates
[2016-09-01 07:04:15] |
Sierra Chart Engineering - Posts: 104368 |
Response from Interactive Brokers: The Trader Workstation (TWS) is a Java application and API programs would connect to TWS via a socket based connection. TWS would host a socket server and listen on a specific port number for API clients to connect. When initiating a socket connection in general, not specific to TWS, one should always make sure that the connection has been fully established before sending out any communication messages. I have went back and found the original log file submitted by the client mentioned in the link provided by you, you should see that Sierra Charts always starts to send out API requests immediately (only 16 ms) after its connection attempts: ---------------------------------------- 06:11:53:172 -> 15-1-U1644808- 06:11:53:188 -> 9-1-11271- 06:11:53:188 <- 62- // Request for account updates was sent out here 06:11:53:188 <- 8-1-40000- ... In the chat with the client, I did not mean you need to wait for a message of Market Data Farm connection as a flag before sending out API requests to TWS. Instead, I only meant that message can be considered as a indicator that indicates the socket connection has been fully established. We apologize for the fact that this is not documented on the current API documentation, but this has always been a suggestion by IB Development Team that API clients should put a wait (about 1 second) in their program to make sure it does not send out API requests before a socket connection has been fully established. We will definitely work on providing a better API documentation to include such suggestion so as to make sure API connection always works smoothly. Regarding: you should see that Sierra Charts always starts to send out API requests immediately (only 16 ms) after its connection attempts:
We understand what you are saying and based upon the original communication from you we changed the delay for requesting account updates to five seconds rather than immediate. For many years, it was always a five second delay because we know it is important to allow the server a chance to do any initial processing after the socket connection comes in. However, when we added support for needing to verify whether a user has a live account and also check their account balance, is the reason why we then switched to an immediate request so that we could determine whether there was a sufficient account balance to meet CME market data requirements for our data feed. This was necessary before considering the connection fully connected in Sierra Chart before any market data requests were made. This type of account balance check proved unreliable and it was removed but we did not restore the five second delay for requesting account updates but it has been now. Even with the five second delay the user is still experiencing a problem. Unless the user did not update to our latest version. This very well could be the source of the remaining problem. We will check with them again. If there continues to be a problem we will let you know. Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2016-09-01 07:09:32
|