Pulling option chain with IBrokers
Like this: opt<-reqContractDetails(tws,twsOption开发者_StackOverflow社区(local="", expiry="20111021",right="",symbol="UCO"))
This is unusably slow. Is this because of IB? Any suggestions on how to get an option chain returned in less than 10 minutes?
thanks
Get a better ISP?
> tws <- twsConnect()
> system.time(opt<-reqContractDetails(tws,twsOption(local="", expiry="20111021",right="",symbol="UCO")))
user system elapsed
0.07 0.00 0.17
> twsDisconnect(tws)
Usually there is a limit on the rate you can request quotes at. Make sure you check the API limitations in their reference guide. They also provide Quote boosters which you can buy in case you want to increase your rate. As far as I understand this applies to historical data only but it might apply to real time data as well as is your case. If you hit the rate the API will keep returning rate limit error until a certain period of time passes and you are allowed to make requests again.
精彩评论