[R-SIG-Finance] IB contract specification for VIX index: load fails

Jeff Ryan jeff.a.ryan at gmail.com
Fri Sep 3 19:18:23 CEST 2010

Actually, this isn't an IB issue, it is actually your construction of
the contract. (though historical is still not possible AFAICT)

Note the first argument is the contract ID (conId)


twsContract              package:IBrokers              R Documentation

Create a twsContract


     Create, test, and coerce a twsContract for use in API calls.



You were passing in the connection object.  I'll try and add some
validity checks if I can...


On Fri, Sep 3, 2010 at 11:15 AM, Jonathan Shore
<jonathan.shore at gmail.com> wrote:
> Hi,
> I'm trying to load a few years worth of VIX data from IB.   I am able to see in the TWS UI, but fail to load in R.   I suspect that I am not specifying the contract properly, but TWS documentation (not the R IBrokers package) is extremely poor.
> As there is no twsIndex() function to create a contract for an index, so have tried a few variations of the following:
> tws <- twsConnect()
> Cvix <- twsContract (tws, "VIX","IND","CBOE", primary="", expiry="", strike = "0.0",
>        currency = "USD", right = "", local = "", multiplier="", NULL, NULL, include_expired="0")
> Requesting historical data with the above contract:
> reqHistoricalData(tws, Cvix)
> hangs indefinitely.  I'm guessing that TWS does not like the contract ...
> Can someone point me to the proper way of specifying the contract.
> Thanks!
> Jonathan
>        [[alternative HTML version deleted]]
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch 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
jeff.a.ryan at gmail.com

More information about the R-SIG-Finance mailing list