IB API to download 500 stocks for SnP 200

Discussion in 'Automated Trading' started by jk90029, Jun 6, 2014.

  1. I am not sure this posting is appropriate for this area.
    Please tell if it not.

    I guess IB (InteractiveBoker) provides (only among many many brokers) use of R, for their API.

    1)I like to get a historical data for the last 1500 daily close for the 500 stocks of SnP500.
    so that a matrix with 1500 rows and 500 columns is stored in my local PC.
    This might be done only by use of R with connection to free yahoo.com finance data, even without use of IB API.

    2)Also during 9:30 and 4:00 I like to get a dynamic price change, possibly a matrix with 500 rows and 1 column, stored in my local PC. I thinks this may require the use of IB API. I do NOT need price change every second but every 1 or 5 minute price might be fine for me.

    There is no free work at all. Since I usually charge my daily work for $200 myself to clients, I can pay the $200 if someone can help me with a daily work.
     
  2. Appreciated if someone direct me any other appropriate place(S) to post.
     
  3. the first part you can do easily from yahoo, quandl or google
    using the quantmod library

    For you second part, it can be achieved from yahoo too... but it takes a little more work, since it doesn't use the official API...


    Here's a couple of examples on how do to it... (it's python, but porting it to R will help you understand the code better :) )

    http://nighttimecuriosities.blogspot.com/2012/08/historical-intraday-stock-price-data.html

    http://www.ele.uri.edu/~naresh/code/yahoo_finance.py

    cheers.
     
  4. vicirek

    vicirek

    OP posted the same in thread "regarding IB API";

    In short IBrokers is R package that provides data access directly from R session by linking to running instance of IB TWS.

    IBrokers is not provided by IB.
     
  5. Thanks to the two helpful comments.

    To [vicirek] There are three places that I posted at the same time.
    It is because I did NOT know the appropriate place at the beginning / Sorry if you are confused.
     
  6. To [eusdaiki]

    Personally I spent years in R but I am new to Python so that I download the Python today.

    Appreciated if you find any intraday in google, for use of R.
    I am ashamed to have not enough knowledge for searching it.