[R-SIG-Finance] twsFuture in reqContractDetails
Jeffrey Ryan
jeffrey.ryan at lemnica.com
Fri Jul 6 14:32:49 CEST 2012
Olivier,
You can set the fields that you are seeking to ="" to act as a wildcard. i.e.
> EBMcons <- reqContractDetails(ibg, twsFUT(symbol="EBM",exch="MATIF",currency="EUR",expiry=""))
> length(EBMcons)
[1] 12
> sapply(EBMcons, function(X) as.twsContract(X)$expiry)
[1] "20120810" "20121112" "20130110" "20130311" "20130510" "20131111"
[7] "20140110" "20140310" "20140512" "20141110" "20150112" "20150310"
HTH
Jeff
On Fri, Jul 6, 2012 at 5:37 AM, omerle <omerle at laposte.net> wrote:
> Hi everyone,
>
> Is there any workaround to get reqContractDetails working for a future contract without
> knowing exactly the expiry ?
>
> For instance if I launch
>
> Contract=twsFUT(symbol="EBM",exch="MATIF",expiry="20130311",currency="EUR")
> reqContractDetails(conn=getOption("ib"),Contract=Contract)
>
> It works but if I have a future without knowing exactly the expiry it doesn't work.
> Or, is there a function to get all the expiries of a given future (for instance EBM).
>
> Thanks,
>
>
> Olivier
>
> Une messagerie gratuite, garantie à vie et des services en plus, ça vous tente ?
> Je crée ma boîte mail www.laposte.net
>
> _______________________________________________
> 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
www.esotericR.com
More information about the R-SIG-Finance
mailing list