Help with Futures in IBrokers
As expected, trying currency="EUR"
reqContractDetails(tws, twsFUT("ESTX50","DTB","201103", currency="EUR"))
[[1]] List of 18 $ version : chr "6" $ contract :List of 16 ..$ conId : chr "76324422" ..$ symbol : chr "ESTX50" ..$ sectype : chr "FUT" ..$ exch : chr "DTB" ..$ primary : chr "" ..$ expiry : chr "20110318" ..$ strike : chr "0" ..$ currency : chr "EUR" ..$ right : chr "" ..$ local : chr "FESX MAR 11" ..$ multiplier : chr "10" ..$ combo_legs_desc: chr "" ..$ comboleg : chr "" ..$ include_expired: chr "" ..$ secIdType : chr "" ..$ secId : chr "" ..- attr(*, "class")= chr "twsContract" $ marketName : chr "FESX" $ tradingClass : chr "FESX" $ conId : chr "76324422" $ minTick : chr "1.0" $ orderTypes : chr [1:34] "ACTIVETIM" "ADJUST" "ALERT" "ALLOC" ... $ validExchanges: chr [1:2] "DTB" "MIBSX" $ priceMagnifier: chr "1" $ underConId : chr "4356500" $ longName : chr "Dow Jones Euro STOXX50" $ contractMonth : chr "201103" $ industry : chr "" $ category : chr "" $ subcategory : chr "" $ timeZoneId : chr "MET" $ tradingHours : chr "20101210:0750-2203;20101213:0750-2203" $ liquidHours : chr "20101210:0750-2203;20101213:0750-2203" HTH Jeff
On Fri, Dec 10, 2010 at 7:36 AM, Jeff Ryan <jeff.a.ryan at gmail.com> wrote:
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
Jeffrey Ryan jeffrey.ryan at lemnica.com www.lemnica.com