Skip to content
Prev 5419 / 15274 Next

Screeningn with IBrokers

Hi Peter,

Since you are passing in a list, use lapply to build it from a
character string (read from your file via scan/read.table/etc (R-help
question if you need to know how to do that ..)
lastTimeStamp symbol bidSize bidPrice askPrice askSize lastPrice Volume
1 2009-12-28 10:00:26   AAPL       1   213.18   213.19       3    213.17  84944
2 2009-12-28 10:08:48    BBY       3    40.89    40.90       1     40.90      0
3 2009-12-28 10:07:12   MSFT    1452    30.99    31.00   12344     31.00      0
    Open   High    Low  Close
1 211.15 213.95 211.10 209.04
2  40.85  41.20  40.80  40.70
3  31.00  31.00  30.97  31.00

Note that snapshot=TRUE tends to be 1) slow and 2) delayed from
real-time.  You would be better off pulling chunks of data with some
sort of custom eWrapper object passed to reqMktData or
reqRealTimeBars.  A further limit is that IB imposes (on data calls) a
limit of 100 concurrent symbols (+/-, depending on account).

With respect to #2, IB can't provide that any better than Yahoo or a
local database.

See:

library(quantmod)
?getSymbols
?getQuote
?Cl

HTH
Jeff
On Sun, Dec 27, 2009 at 8:10 AM, Peter Rote <r.rote12 at googlemail.com> wrote: