Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

option contract specification #44

Open
tbrown122387 opened this issue Jul 27, 2023 · 0 comments
Open

option contract specification #44

tbrown122387 opened this issue Jul 27, 2023 · 0 comments

Comments

@tbrown122387
Copy link

tbrown122387 commented Jul 27, 2023

Description

Specifying vanilla option contracts seems a bit touchy.

Minimal, reproducible example

For some reason these don't work

library(IBrokers)
tws <- twsConnect()
IBrokers::reqMktData(tws, IBrokers::twsOption(local = "SPY 230727C00460000"))
IBrokers::reqMktData(tws, IBrokers::twsOption(local = "SPY 20230727C00460000"))

but this works

library(IBrokers)
tws <- twsConnect()
IBrokers::reqMktData(tws, IBrokers::twsOption(symbol = "SPY", exch = "SMART", 
                                              local = "", right = "C", 
                                              strike = 460, expiry = "20230727"))

Session Info

R version 4.2.1 (2022-06-23) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.4 LTS  Matrix products: default BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0  locale:  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8      [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                   [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C         attached base packages: [1] stats     graphics  grDevices utils     datasets  methods   base       other attached packages: [1] IBrokers_0.10-2 xts_0.13.1      zoo_1.8-12       loaded via a namespace (and not attached): [1] compiler_4.2.1  tools_4.2.1     grid_4.2.1      lattice_0.20-45
--
 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant