Ah, thanks.  Had mistakenly read conId as connection (handle).    For anyone interested, either of these contract specs work:

Cvix <- twsContract ("13455763", 'VIX','IND','CBOE', primary="", expiry="", strike = "0.0", 
		currency = "", right = "", local = "", multiplier="", NULL, NULL, include_expired="0") 
Cvix <- twsContract ("0", 'VIX','IND','CBOE', primary="", expiry="", strike = "0.0", 
		currency = "", right = "", local = "", multiplier="", NULL, NULL, include_expired="0") 

reqHistoricalData(tws, Cvix)


On Sep 3, 2010, at 1:18 PM, Jeff Ryan wrote:

> 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
> 
> twsContract              package:IBrokers              R Documentation
> 
> Create a twsContract
> 
> Description:
> 
>     Create, test, and coerce a twsContract for use in API calls.
> 
> Usage:
> 
>     twsContract(conId,
>                 symbol,
>                 sectype,
>                 exch,
>                 primary,
>                 expiry,
>                 strike,
> 
> 
> You were passing in the connection object.  I'll try and add some
> validity checks if I can...
> 
> Jeff
> 
> On Fri, Sep 3, 2010 at 11:15 AM, Jonathan Shore
> <jonathan.shore@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@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@gmail.com


	[[alternative HTML version deleted]]

