TWS: Any way to integrate directly into Mosaic?

Discussion in 'App Development' started by Surgo, Jul 25, 2016.

  1. Surgo

    Surgo

    I couldn't find within TWS a reasonable way to display changes in price and volatility on options strategies, and while Livevol X was nice it's also an insane amount of money per month, so I'm writing one myself.

    TWS lets me integrate directly into the colored display groups via http://interactivebrokers.github.io/tws-api/display_groups.html#gsc.tab=0 which is nice. What would be even nicer would be to put my own little 'application' into a Mosaic window and not have to launch it as a separate program whenever I want to use it. I know they have the ability to do this; their Risk Navigator downloaded as a separate jar the first time I launched it. Do they expose this ability at all?

    edit: To be a little more clear -- I'm more interested in making something like a plugin than a separate application.
     
    Last edited: Jul 25, 2016
  2. Ryan81

    Ryan81

    I don't think IB publishes documentation about any public APIs to do what you are asking.

    I suppose you could download a java decompiler (like http://varaneckas.com/jad/) and unzip the jar file from RiskNavigator and use the decompiler on the '.class' files contained within.... In order to see how their RiskNavigator is plugging into the rest of TWS. Of course, if you do this, you are "going pretty far off the reservation"... and IB could change the spec/params/semantics of these "unpublished" APIs at any time out from under you.
     
    Baron likes this.
  3. And a mistake could harm a live trading system.

    Although it would be great if it was more extensible. Even simple things like custom columns on a watch list (the fundamentals available are woefully small).
     
  4. Surgo

    Surgo

    Just to follow up if anyone else is interested in this in the future, I asked Interactive Brokers about it and they said there was no support for creating a plug-in like that. Very disappointing.
     
  5. marsman

    marsman

    Allowing such 3rd party plugins would open up a can of worms for TWS, IB, and the licensor of TWS.
    Just write your own application that interacts with TWS via the IB trading API.
    There's even such a sample application in the 9.71 API (available only in the Windows branch of the code).
    Since you say you don't want a sperate application, rather a plugin: then you can write a daemon program (called service program in Windows) that runs in the background...
     
    Last edited: Jul 30, 2016
  6. Surgo

    Surgo

    I don't get your post at all...

    Yes I know all about the API. You'll note in the start of this thread that I mentioned one of the interesting things that one could do with it. In fact, I even linked to the documentation.

    Furthermore, a daemon is still a separate application. And at some point you need to actually have a foreground display to give the information to the user. You'll note that in the original post I said I was creating "a reasonable way to display changes in price and volatility on options strategies".
     
  7. marsman

    marsman

    I just told you about the remaining choices/alternatives you now have... Or what else do you think you can do if the TWS licensor said "no" to your request?
     
  8. Surgo

    Surgo

    Yes, the choices I knew about beforehand and mentioned in the original post, while trying to discover if there was a better option out there (the answer to which was "no").

    As for what else I can do, I can decompile the TWS jar. Already done, but there's a bit too much there for me to filter through and I don't trust them to keep the interface stable enough. Wasn't able to find a ClassLoader equivalent that could pull in an arbitrary new jar, either.
     
  9. marsman

    marsman

    You are doing illegal things...
     
  10. Surgo

    Surgo

    Decompiling a jar is not illegal, lol.
     
    #10     Jul 30, 2016