[R-SIG-Finance] reqHistoricalData for comboLeg

Niklas K nk at fennoturvapalvelut.com
Sat Apr 20 15:19:34 CEST 2013


Hi,

Thanks, thats right can probably not use "SMART" there.

It appears possible to get comboLeg data from the IB API: 
https://stat.ethz.ch/pipermail/r-sig-finance/2012q3/010588.html


-n



On 20.4.2013 16:13, Jeff Ryan wrote:
> Hi Niklas,
>
> I haven't been able to check, but I don't think you can use
> exhange="SMART", rather it must be explicit, i.e. "CBOE".
>
> I also don't think you can get the combo price, rather you need to
> request the historical data for each leg.  Would of course love to be
> proved wrong...
>
>
> HTH
> Jeff
>
>
> On Sat, Apr 20, 2013 at 2:51 AM, Niklas K <nk at fennoturvapalvelut.com
> <mailto:nk at fennoturvapalvelut.com>> wrote:
>
>     Hi,
>
>     I am trying to get historical data for a comboLeg with the following
>     code:
>
>
>
>       tws <- twsConnect(1)
>       bag <- twsBAG(    list(
>         twsComboLeg( conId = "43635367", ratio = "1", action = "BUY",
>     exchange = "SMART"
>           )
>           ,
>           twsComboLeg(  conId = "47207284", ratio = "1", action =
>     "SELL", exchange = "SMART"
>           )
>         )
>       )
>       reqHistoricalData(tws, Contract=bag, barSize='1 min', duration='2 D')
>
>
>
>
>     For some reason it gets stuck at:
>     "waiting for TWS reply on USD ..."
>
>     If someone has been successfully getting data for comboLegs from IB
>     tws I would be thankful for any tips.
>
>     -niklas
>
>     _________________________________________________
>     R-SIG-Finance at r-project.org <mailto:R-SIG-Finance at r-project.org>
>     mailing list
>     https://stat.ethz.ch/mailman/__listinfo/r-sig-finance
>     <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 <mailto:jeffrey.ryan at lemnica.com>
>
> www.lemnica.com <http://www.lemnica.com>
>
> R/Finance 2013: Applied R in Finance
> May 17, 18 Chicago, IL
> www.RinFinance.com <http://www.RinFinance.com>
>



More information about the R-SIG-Finance mailing list