Take the 2-minute tour ×
Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It's 100% free, no registration required.

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.

share|improve this question
    
What exactly do you need to do with IB? Simply capture quotes? Actually trade? That will influence a lot the answer. –  Frankie Oct 15 '12 at 17:51
    
Simply capture quotes. I am not going to trade over this custom app. Basically it will fetch data. –  jsinghfoss Oct 15 '12 at 18:24
    
But are you looking into bars (open, high, low, close) or are you planning on capturing tick data? –  Frankie Oct 15 '12 at 22:34
    
I plan to capture tick data –  jsinghfoss Oct 16 '12 at 12:40
    
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. –  Frankie Oct 16 '12 at 14:32
show 1 more comment

2 Answers

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 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).

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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