reqMktData(tws,twsOPT("AAPL 110820C00390000"))
or
reqMktData(tws,twsOPT("AAPL110820C00390000"))
result in: TWS message: 2 1 200 Security definition not found for query
Why?
reqMktData(tws,twsSTK("AAPL"))
works great.
The manpage says:
twsOption(local,
expiry="",
strike="",
right="",
exch="SMART",
primary="",
currency='USD',
symbol='',
multiplier="100",
include_expired='0',
conId=0)
Options contracts on TWS have certain rules that differ from standard data requests.
A local character is required. This can be found on the TWS home screen for contract details or online at www.interactivebrokers.com
Since a local character is required, all other values ββare redundant. Itβs best to just provide a local name and let TWS manage the search.
source
share