Ruby interface for Interactive Brokers TWS available

Discussion in 'Automated Trading' started by Raul641, Nov 30, 2006.

  1. Raul641

    Raul641

    Hi all,

    I am happy to announce that there is now an preliminary version of a Ruby interface to the IB TWS socket protocol available from http://rubyforge.org/projects/ib-ruby/ .

    Please bear in mind that this is still a DEVELOPMENT version, not ready for prime time quite yet. Not all features are implemented yet, but it will serve as the foundation for a more complete system.

    Patch submissions and bug reports are welcome. Working together, we can make a stable low-level platform for all of us to use and build upon.
     
  2. awesome

    is there a simulator i can hook up to?
     
  3. Raul641

    Raul641

    There's no simulator per se, but it works fine with TWS in paper trading mode.
     
  4. So what problems does having a new Ruby interface solve? Can you articulate what feature set in the Ruby interface makes this an improvement over the Java interface?

    BTW, if you are doing this to get experience as a Ruby developer and have something to put on your resume, then that's fine.
     
  5. Raul641

    Raul641

    The main advantage is that it allows you to program IB apps in the Ruby programming language rather than in Java.

    The endless programming language holy wars have already been debated to death a thousand times over elsewhere (see e.g. http://www.google.com/search?q=java+ruby+advantages), but to summarize, Ruby has much simpler syntax, a much more functional programming style, duck typing, a syntax conducive to list processing, and vastly better metaprogramming facilities.

    The disadvantages are that, with no large company such as Sun to back it up, Ruby's development occurs rather slowly compared to Java's. There is no Ruby compiler; it is interpreted only, and the interpreter is slow. It has a much smaller set of available libraries, and of course there is no marketing department spending millions of dollars to promote Ruby in the corporate world.

    Having programmed professionally and extensively in both Java and Ruby, I can say that, in my experience, Ruby apps are much easier and faster for me to develop and debug, more than offsetting the disadvantages in most cases. But, there's no accounting for taste, of course; the best language for you is whatever allows you to get the job done in the most direct and robust way.
     
  6. sprstpd

    sprstpd

    I went to the link. Maybe I am ignorant but I don't see any files/libraries to download. Am I missing something?

    I've never used RubyForge before, maybe that's my problem.
     
  7. ruby on rails will save you tons of time in infrastructure work compare to java. especially if you're tracking data with some type of SQL database

    its definitely slower than java, but its your time versus buying another machine or two


     
  8. Raul641

    Raul641

    There are no packaged files yet, as this is still under development.

    You can check the project out of SVN with:

    svn checkout svn://rubyforge.org/var/svn/ib-ruby

    (http://rubyforge.org/scm/?group_id=2652)
     
  9. I understand the point of view from a developers perspective about the framework, but what does this new interface bring to the table for traders? Again, what problems is it solving for traders that the Java interface lacks?
     
  10. With any interface you remain limited by the IB API. None of the existing interfaces (python, perl, etc) add anything. They just allow you to choose a different language to work in.

    I've been using Ruby for my IB ATS for the last 8 months and love it. I find it much easier and faster to program than Java.

    Does this project include any charting? Or would Ruby be too slow for realtime charting?
     
    #10     Dec 1, 2006