3

I know R and I am heavy user of Fidelity stock trading. I wonder if some R powerusers were able to find a broker which has an API and there is some sample R code to start with. Any broker is fine and any fees are fine - i would like simply to know if it is even possible. (even I have to pay a hefty monthly fee or something)

userJT
  • 11,486
  • 20
  • 77
  • 88

2 Answers2

7

Interactive brokers has an API which you can access w/ various languages and Jeff Ryan has written a package on CRAN to do extend that to R. I haven't used them so I don't know what their fees are but the setup for the IBrokers packages seems sensible. Caveat emptor: program trading at medium frequency beats lighting your money on fire as a trading strategy, but only just. ;)

Adam Hyland
  • 878
  • 1
  • 9
  • 21
  • thanks. I am wondering if IBrokers is my only option from within R. – userJT Feb 13 '12 at 04:27
  • [here](http://stackoverflow.com/questions/59327/what-online-brokers-offer-apis) is another question about brokers and APIs. – Adam Hyland Feb 13 '12 at 04:40
  • 1
    I've had multiple people recommend Interactive Brokers, but I think it's really just the best of bad lot. I found both their sign-up process and their API to be kinda horrible. – jm3 Jan 11 '13 at 04:11
3

tradeking.com (which merged with or bought Zecco) has a RESTful API...a pretty nice one. I'm using it, and it's very simple to get started. They also have really low fees.

Chad Johnson
  • 21,215
  • 34
  • 109
  • 207