Is it possible to use HTML for API ??

Discussion in 'App Development' started by lindq, Oct 24, 2011.

  1. Yes, you could write a parser to read any syntax you desire... That doesn't change the fact that HTML isn't the tool for this job by a long shot.
     
    #11     Oct 24, 2011
  2. Exactly.
     
    #12     Oct 24, 2011
  3. Why don't you post an example of what you're currently doing, and the result from that "outfit" and we'll see what you mean.

    This isn't about what's possible, it's about not trying to use a needle-nose pliers to hammer in a nail.
     
    #13     Oct 24, 2011
  4. XOM

    XOM


    Is your trading platform a Custom Build?

    Do you have a screen shot to show what the HTML output is when a signal is generated?

    Since your trading platform is already capable of generating a signal for the IB API, then modifying it to handle multiple IB accounts would be the more direct approach than parsing HTML and then handling multiple IB accounts.
     
    #14     Oct 25, 2011
  5. byteme

    byteme

    I suppose the obvious question is, why does your platform emit HTML formatted signals?

    If you have the control over the platform, it would be more efficient to emit signals in some other format that is more readily consumed by a ready-made OMS/execution engine. It's been a number of years but I seem to remember something like Zero line trader could pick up files written to a directory to then execute trades with IB. There were also a number of other products....

    However, even that is more complicated than it needs to be. Since your platform can already communicate with the IB API, why don't you set it up to do so? Just point it to another instance of TWS running on another computer with the other account. You'll have to specify the IP address and port number etc. But that's all.

    Am I correct in assuming the main challenge you are facing is to trade two different accounts with the same platform?

    Again, another solution would be to run two copies of the platform on different computers each connected to their own IB TWS with different accounts.

    In short, I'm sure there's a simpler and more elegant solution to the problem rather than having to deal with parsing HTML signals from your platform and then creating orders from the result....which as others have pointed out is a bit "retarded" unless of course you have no control over the platform.
     
    #15     Oct 25, 2011
  6. kandlekid

    kandlekid

    HTML can format the client side (it's essentially a screen formatting language), but I don't see how it can talk to the server side where the IB API lives. I think you need a scripting language like PHP, Javascript or ASP, etc to both write the HTML to the browser (and get the response from a form) and write/read the server side. Isn't this why these languages/tools were invented ? Otherwise we would only need HTML for everything related to the internet.
     
    #16     Oct 25, 2011
  7. SteveH

    SteveH

    Most applications that want to have HTML for the user interface outside of the browser use a library like Sciter or HtmlLayout.

    But all this transport / parsing talk by the original poster sounds more like XML is being used, not HTML: two entirely different functionalities which would only seem the same to a non-programmer.
     
    #17     Oct 25, 2011
  8. lindq

    lindq

    Yes, correct assumption. And that is my current configuration. Running two platforms, each with an account.
     
    #18     Oct 25, 2011
  9. What you need is a development environment that supports both DHTML/Javascript as well as the data handling required to place orders, etc.
    Microsoft's ASP.NET would do this and of course, you have the open-source Java and JQuery alternative.

    Thinkorswim did a superb job using Java and Javascript in developing their web-based platform. That being said, I still prefer a desktop app for trading.
     
    #19     Oct 25, 2011