[R-SIG-Finance] IBrokers Problem

G See gsee000 at gmail.com
Mon Dec 9 16:06:21 CET 2013


I don't know; it works for me.  Does reqCurrentTime(tws) return the
current time?

Garrett

> tws <- ibgConnect()
> reqCurrentTime(tws)
[1] "2013-12-09 09:04:37 CST"
> reqContractDetails(tws, twsEquity("QQQ"))
[[1]]
List of 18
 $ version       : chr "6"
 $ contract      :List of 16
  ..$ conId          : chr "43661924"
  ..$ symbol         : chr "QQQ"
  ..$ sectype        : chr "STK"
  ..$ exch           : chr "SMART"
  ..$ primary        : chr "NASDAQ"
  ..$ expiry         : chr ""
  ..$ strike         : chr "0"
  ..$ currency       : chr "USD"
  ..$ right          : chr ""
  ..$ local          : chr "QQQ"
  ..$ multiplier     : chr ""
  ..$ combo_legs_desc: chr ""
  ..$ comboleg       : chr ""
  ..$ include_expired: chr "0"
  ..$ secIdType      : chr ""
  ..$ secId          : chr ""
  ..- attr(*, "class")= chr "twsContract"
 $ marketName    : chr "NMS"
 $ tradingClass  : chr "NMS"
 $ conId         : chr "43661924"
 $ minTick       : chr "0.01"
 $ orderTypes    : chr [1:49] "ACTIVETIM" "ADJUST" "ALERT" "ALGO" ...
 $ validExchanges: chr [1:17] "SMART" "ISE" "CHX" "ARCA" ...
 $ priceMagnifier: chr "1"
 $ underConId    : chr "0"
 $ longName      : chr "POWERSHARES QQQ NASDAQ 100"
 $ contractMonth : chr ""
 $ industry      : chr "Funds"
 $ category      : chr "Equity Fund"
 $ subcategory   : chr "Sector Fund-Technology"
 $ timeZoneId    : chr "EST"
 $ tradingHours  : chr "20131209:0400-2000;20131210:0400-2000"
 $ liquidHours   : chr "20131209:0930-1600;20131210:0930-1600"

On Mon, Dec 9, 2013 at 7:47 AM, Michael Smith <my.r.help at gmail.com> wrote:
> Thanks for the quick reply, but R still hangs after running this command
> with the new ticker.
>
> Best,
> Michael
>
>
> On 12/09/2013 09:29 PM, G See wrote:
>> The ticker for that ETF changed to QQQ on March 23, 2011
>>
>> Try reqContractDetails(tws, twsEquity("QQQ"))
>>
>> Best,
>> Garrett
>>
>> On Mon, Dec 9, 2013 at 7:27 AM, Michael Smith <my.r.help at gmail.com> wrote:
>>> All,
>>>
>>> I'm trying to better understand how to use the IBrokers package by going
>>> through the `IBrokers.pdf` vignette. I'm using the demo version of TWS
>>> (login `edemo`). TWS seems to be running fine. However, I get stuck at
>>> the following command from the vignette:
>>>
>>> reqContractDetails(tws, twsEquity("QQQQ"))
>>>
>>> R just seems to hang and I don't get any further response. My
>>> sessionInfo is below. I'm using the most current IBrokers from Google Code.
>>>
>>> Am I doing something wrong, or is this not supposed to work with the TWS
>>> demo version?
>>>
>>> Thanks,
>>> Michael
>>>
>>>
>>>> sessionInfo()
>>> R version 3.0.2 (2013-09-25)
>>> Platform: x86_64-redhat-linux-gnu (64-bit)
>>>
>>> locale:
>>>  [1] LC_CTYPE=en_US.utf8       LC_NUMERIC=C
>>> LC_TIME=en_US.utf8
>>>  [4] LC_COLLATE=en_US.utf8     LC_MONETARY=en_US.utf8
>>> LC_MESSAGES=en_US.utf8
>>>  [7] LC_PAPER=en_US.utf8       LC_NAME=C                 LC_ADDRESS=C
>>>
>>> [10] LC_TELEPHONE=C            LC_MEASUREMENT=en_US.utf8
>>> LC_IDENTIFICATION=C
>>>
>>> attached base packages:
>>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>>
>>> other attached packages:
>>> [1] IBrokers_0.9-11 xts_0.9-7       zoo_1.7-10      colorout_1.0-1
>>>
>>> loaded via a namespace (and not attached):
>>> [1] grid_3.0.2      lattice_0.20-24 tools_3.0.2
>>>
>>> _______________________________________________
>>> 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.



More information about the R-SIG-Finance mailing list