IB trader workstation auto login...

Discussion in 'Trading Software' started by bidmasterx, Apr 16, 2003.

  1. I have been trying to figure out how I could write a little program to log into TWS for me when I'm not beside the computer. After a few days of searching around on the internet I figured out how to send keystrokes to IB, and wrote a very simple vb application to do this. I use this program to log into TWS when I'm not around the computer, and it works fine for me so I thought I would share this with other people out there that may find this useful.

    I have written this program in vb and have included the source code and compiled program within the attachment, however you must have visual basic installed on your computer for this to work. I also have a distribution version which can be installed on any windows system, however, due to the 2.1meg size I cannot upload that here. If someone can contact me to put the file on their server that would be great so others can use the program.

    Please note that for the program to work, you must setup the into.txt file with a username/password/path combination first. More details can be found in the readme file. Note that this program is very slow to load TWS, I put delays in on purpose to ensure that TWS is loaded before the program sends the keystrokes to login. During the roughly 30s wait, do not start other programs or click other windows as this will cause TWS not to start.

    Finally, I am not a computer programmer and thus have probably made numerous errors in my code so I advise that you test the auto login with the demo account first before using on your live account. I will not be held liable for any problems caused by the program, use it "as-is" at your own risk. If you have questions or comments you can either post on this thread or PM me and I will try to help (I am very busy with exams now), don't get upset if I respond late. Hope this helps out,
  2. sorry...
  3. ...
  4. info.txt
    • info.txt
      File size:
      133 bytes
  5. I'm planning to add a module to my VB.NET ATS application for TWS auto-login. However, I want to encrypt the username and password. Does anyone have pointers for safely doing this?


    Edit: I want to save an encrypted version of my username and password. However, if somebody gets a copy of the source code they might be able to decrypt the username and password. I can't think of a way to get around this...
  6. Thanks for the suggestion. But I'd like to be able to do this from my own application. How safe is your username and password using this program?
  7. There is no encryption in AutoIt. You can create executable files so the password is protected from the causal viewer but not a hacker. Since I used it on my PC, I was not concerned about encryption.
  8. Is your ATS running in remote site? If so encryption does help, but remember it has to be decrypted by your program. So it's not 100% safe if running on a remote site. If it's on your computer, there's no need to do so as TWS sends your password using SSL if you choose to.

  9. There are several programs with full source code that do this same thing in various different ways, including one I wrote for VB6 that can be found in the files section of the TWSAPI list, a list that I help moderate:


    Other utilities in that area simulate clicking OK on the "Accept Incoming Connections" dialog, playing a sound when the connection to IB is lost, as well as auto logging into the TWS.

    There are numerous other samples in other programming languages and lots of good info in the list archives on a host of TWS API issues.
    #10     Mar 16, 2005