Is it possible to use HTML for API ??

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

  1. lindq

    lindq

    I'm not a coder. But I'm wondering if it is possible to use HTML to communicate with IB's API to place trades.

    I do know that it isn't possible to directly get a signal to IB's API with HTML, but my thought is there may be a way to "convert" an HTML signal to a language acceptable to IB's API. (DDE, C++, Java, etc.)

    Thus, an HTML signal generated by my trading platform would be converted to another language and sent to IB's TWS. (My platform currently generates a signal to IB's API, but for only one account. It will also generate an HTML signal that I, the user, can create. If possible, I would like to use that channel to get an order to another account. Make sense?)

    Any thoughts on the subject are appreciated.
     
  2. No.


    HTML is a document markup language... it is not a scripting language.
     
  3. Yes, it is possible. There are plenty of open source HTML parsers out there. The only problem is that you will have to create your own interface software (HTML->TWS API), so I am not sure if this method is going to help you.
     
  4. Html is more of a templating system. It isn't even interpreted like java script, which is probably what you would need, as html has no algorithmic constructs such as loops or conditionals.
     
  5. lindq

    lindq

    Thanks for the response. Yes, after doing a search I did notice that there are some "translators" for HTML into Java, etc., which IB's API info seems to suggest is a useful language for their API.

    Thus, I am going to assume (?) that an experienced coder can probably accomplish this.

    Of course, 'Nothing hard is ever easy.'
     
  6. Fine, ignore everyone who actually knows what they are talking about.


    You are barking up the wrong tree with HTML.
     
  7. lindq

    lindq

    I have for some time been sending HTML to a system-tracking outfit that converts the HTML to trading data and places the trades in simulated accounts. So somehow, it appears that they are converting the HTML into code.

    I have no coding background, but given how far things have come in the past few years it would surprise me if what I envision was NOT possible.
     
  8. Any experienced coder can create a program that will parse your HTML file and send the proper trading commands to IB using their API. If the HTML output is fairly straight forward, then the programming task will not be that difficult.


     
  9. that's just treating html as an input file to feed into their engine for processing, which is pretty fucking retarded. You could just feed a text/csv file.

    html is static markup used to write pretty webpages, you need an object oriented language such as java/c++ to actually connect to the trade api. You cannot connect html directly to trade api.

    It's as if you are asking can i replace a car's engine with its doors? it makes absolutely no sense.
     
    #10     Oct 24, 2011