[R-SIG-Finance] [R-sig-finance] Interfacing R with Interactive Brokers

Jeff Ryan jeff.a.ryan at gmail.com
Tue May 12 14:16:33 CEST 2009


As Brian pointed out, the only CRAN version is via IBrokers.

This is implemented entirely in R code, so it is very portable and
very "R"-like with respect to managing events to/from the TWS (Trader
Workstation).  There are two vignettes, though both are not quite
synched with the current release to CRAN (a brand new 0.2-0 as of
yesterday). The second vignette isn't complete yet either.

The package is an entirely re-implemented API based off the
Interactive Brokers sources.  There is no dependence on the 'official'
API.  Licensing or otherwise (IBrokers is GPL'd).

There are of course numerous other ways to manage a connection.  You
can use the Java API and something like RJava (look at RIB on Rforge).
 Or Rpy and the IbPy interface for Python.  The trading-shim is also a
viable option.  You could even write it at the C/C++ level and call R
from there when needed.  Keep in mind there are many technical issues
once you add an additional layer into the mix.  There may also be
licensing issues given that the official API has no visible license...

One of the major benefits of "IBrokers" is that you get a lot more
design than just a simple wrapper to the underlying API/connection.
Through the use of eWrapper closures and a customized twsCALLBACK you
can quickly build live trading systems entirely in R.  Order handling
isn't quite ready yet (though is available in the technical/alpha
sense), but should be very soon.

If you give it a try, please pass along good and bad feedback to the
author (me ;) )

Thanks,
Jeff

On Tue, May 12, 2009 at 3:43 AM, TipTop <johnni.nielsen2 at gmail.com> wrote:
>
> Hey,
>
> has anyone here been able to succesfully interface R with a Interactive
> Brokers account?
> What is your experience and recommendations?
>
> Regards
>
> Johnni
> --
> View this message in context: http://www.nabble.com/Interfacing-R-with-Interactive-Brokers-tp23498533p23498533.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>



-- 
Jeffrey Ryan
jeffrey.ryan at insightalgo.com

ia: insight algorithmics
www.insightalgo.com



More information about the R-SIG-Finance mailing list