Hi,

I made some progress on this; here are the results, in case someone's facing
the same trouble:

2. & 3. there are some good posts which deal with this issue (this one in
particular:
http://www.mail-archive.com/r-sig-finance@stat.math.ethz.ch/msg00927.html).

The answer for question 4 is that one has to explicitely specify the
currency; I wrongly thought that the stock Id and the exchange identified
the stock enough to make the ccy redundant!

twsEquity("SAN","SBF",currency = "EUR")


But I now have an other question.
Using the examples from the reference above, I can now retrieve in RT prices
from stocks (even non US,it works fine), futures, but when I want to get a
forex, specifying the contract with twsCASH("EUR") for ex, there is no
answer. The system does not come back.

Any pointer for this?

Thanks a lot

Johnny

PS: Thanks a lot, Jeff, for this IBrokers package!


On Tue, Mar 29, 2011 at 7:20 PM, Johnny Paulo <johnny.jp.22@gmail.com>wrote:

> Hi,
>
> I am trying to implement a simple function to get the lastPrice field for
> equities, futures...
> My first attempt is:
>
>          reqMktData(tws,twsEquity(x$id,x$exchange),snapshot=T)$lastPrice
>
> where x is an equity object having the 2 required fields: name and
> exchange.
>
> This works randomly at best and is very slow (given that it is supposed to
> be real time!)
>
> So, I went through the pages where similar issues were reported; but there
> is a lot of things that are not yet clear:
>
> 1- it seems, setting snapshot = T is wrong and slow. Why?
> 2- if we look at the API doc, it seems reqMktData is deprecated and
> reqMktDataEx should be used instead; and the interface for reqMktDataEx is
> very simple (no callback, no wrapper). Is there something similar in the
> IBrokers package?
> 3- if we must go with callbacks and wrappers, is there any good pointer for
> a tutorial on this?
> 4- I am trying to get the lastPrice for a french stock: I use
> twsEquity("SAN","SBF"), but I get a msg like
>
>                                  2 1 200 No security definition has been
> found for the request
>
> I guess I don't specify well the stock Sanofi which has SBF as its main
> exchange. Is there a pointer to the way IB symbols work?
>
> Thanks a lot in advance
>
> Johnny.
>
>
>
>

	[[alternative HTML version deleted]]

