regarding IB API

Discussion in 'App Development' started by jk90029, Jun 6, 2014.

  1. I am not sure this posting is appropriate for this area.
    Please tell me 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.

    ******************************************************************

    Appreciated if someone direct me any other appropriate place(S) to post.
     
  2. xandman

    xandman

    Can you use that code for IB by replacing the URL and symbol format?
     
  3. No sir. I am fairly new to IB and TradeKing.

    Any possible directions or explanations are welcomed.
     
  4. 2rosy

    2rosy

  5. vicirek

    vicirek

    IBrokers is R package provided by R developer that is available in R repository.

    IBrokers is not provided by IB and as with any API/Interface to TWS there are no warranties etc.

    If you know R then just install package from R command line, load it, read documentation and use IBrokers with running instance of TWS (IB interface Trader Workstation)

    In this case data requests will populate your data objects within running R session as specified by you using R scripting commands.

    It is good idea to have good understanding of TWS API (documentation available on IB site) especially if you request historical data because IB sets few requirements and limitations and sometimes experimentation is needed.

    General questions (probably not R related but you may try) are answered by IB API board (IB API site) or TWS API Yahoo group message board.

    As IB customer you are getting 100 real time "lines". To get 500 you would have either trade a lot, pay extra money or play with subscribing and unsubscribing to real time data. I am not sure if IB gives you specifically closing or open prices - it is usually the last (first) tick or bar for the day and may differ from other data providers.
     
  6. Regarding 1) I think IB is quite bad for obtaining historical data as they have many restrictions, e.g. pacing limitations, only dating back 1 year in time etc.

    Regarding 2), if you are ok to use Matlab I can help you out.
     
  7. Please take a look at your personal page in this site. There is message waiting for you.
     
  8. Ok.