4
$\begingroup$

The requirement I am given is to implement a web ppplication which utilizes Interactive Brokers's API to fetch data. I went through the IB API web page and came across two viable methods: TWS and IB Gateway. But both method require proprietary executables to be running. This doesn't make sense from a web perspective as my hosting provider will not allow to run an executable on their infrastructure. Is it not possible to just access their API using Username/Password or some API Key or something similar from a Web Server?

If it's not possible could you please share what other companies (like IB) have web friendly APIs.

$\endgroup$
6
  • $\begingroup$ What exactly do you need to do with IB? Simply capture quotes? Actually trade? That will influence a lot the answer. $\endgroup$
    – Frankie
    Oct 15, 2012 at 17:51
  • $\begingroup$ Simply capture quotes. I am not going to trade over this custom app. Basically it will fetch data. $\endgroup$
    – jsinghfoss
    Oct 15, 2012 at 18:24
  • $\begingroup$ But are you looking into bars (open, high, low, close) or are you planning on capturing tick data? $\endgroup$
    – Frankie
    Oct 15, 2012 at 22:34
  • $\begingroup$ I plan to capture tick data $\endgroup$
    – jsinghfoss
    Oct 16, 2012 at 12:40
  • $\begingroup$ You MAY capture tick data via a web-interface but the majority of users will strongly recommend you don't and I'm pretty sure you will want to stay as far away from it as you possibly can. $\endgroup$
    – Frankie
    Oct 16, 2012 at 14:32

2 Answers 2

2
$\begingroup$

Don't try to capture LIVE tick data using a WebApp.

I'm not saying it can't be done, I'm just saying you would get zero benefits and you would have to work way harder to make it functional. Web servers are designed with a premise, serve the user the requested data as fast as possible and free that resource up.

  1. You would have to fight the server logic (as it is not designed to run that way)

  2. You would have to fight your provider (as it may interpret the server as crashed and close it)

In order to capture tick-data using IB use Java and look into VPS (virtual private servers) where you are allowed to run whatever process you want.

Over the last 4 years I've been using the following companies for several long-polling apps (both finance and non-finance related) with great success.

You can even run X on these headless systems (and you will need X to run Interactive Brokers API - both on the TWS version and on the Gateway one).

$\endgroup$
0
$\begingroup$

I second parts of Frankie's answer here but for a different reason and with additional caveats:

First yes, do not run a process that does not serve content you already provide as a web application. The point of a web app is to simply make content available on a standardized medium for distribution purposes and not for computational or data gathering purposes.

I have seen people implementing a whole strategy testing and trading platform on a web app, which imho makes zero sense. Its a very inefficient and prone to error process. The point is that if a single of your computations goes down it essentially renders the whole web app useless. The correct way to run this is to gather your data through the API on a server or local machine (whatever you prefer) and to then offer the gathered data (raw or cleaned or otherwise processed) to users through a web application.

You actually answered the question yourself, you often need other processes that run in order to gather the data you inquire and you don't want to have to mess with this on a web app and or even worse force the user of the web app to run other processes just in order to make it work. Gather the data on a machine, process the data, make the data available through a web server and use the web app as interface. Simple as that.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.