Is it possible to use HTML for API ??

Quote from swingtrader123:

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.

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.
 
Quote from newguy05:

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.

Exactly.
 
Quote from 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.

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.
 
Quote from lindq:
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.


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.
 
Quote from 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.

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.
 
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.
 
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.
 
Quote from byteme:

[B
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.
[/B]

Yes, correct assumption. And that is my current configuration. Running two platforms, each with an account.
 
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.
 
Back
Top