[R-SIG-Finance] Help with Futures in IBrokers

Jeff Ryan jeff.a.ryan at gmail.com
Fri Dec 10 14:36:25 CET 2010


Saul,

reqMktData is an infinite loop awaiting incoming data, so forcing it
close is the expected and only result of calling it typically.

You'll need to be able to handle errors/warning in your code generally
-- as there are potentially hundreds of different ones, all warnings
from the TWS that may or may not matter to your system.

In effect, your issue is that the contract you are requesting is
misspecified in some way.  I am not at my desk, but in general you'lll
need to try:

reqContractDetails to understand the correct specification. I suspect
you are missing the correct "currency" arg in the twsFUT call, as it
defaults to USD.  As I alluded to in an earlier reply to another
posted, I'll likely change this to a global option or provide
something like a lookup based on exchange...  of course reading the
docs (IBrokers and IBs) is the first step in figuring out what is
wrong.

Best,
Jeff

On Fri, Dec 10, 2010 at 5:23 AM, Saul Sala Peñalver <akrabolsa at gmail.com> wrote:
> Hi everyone,
>
> I am starting to use Ibrokers with R but I keep receiving an error message when trying to get Futures Data that I have real-timein Ibrokers:
>
> reqMktData(tws,twsFUT("ESTX50","DTB","201103"))
> TWS Message: 2 1 200 No secutiry definition has been found for the request
>
> and R keep working and I have to force closing since it doesn't respond
>
> Thank you,
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
>



-- 
Jeffrey Ryan
jeffrey.ryan at lemnica.com

www.lemnica.com



More information about the R-SIG-Finance mailing list