reqMktData(tws,twsOPT("AAPL 110820C00390000"))
or
reqMktData(tws,twsOPT("AAPL110820C00390000"))
result in: TWS Message: 2 1 200 No security definition has been found for the request
Why?
reqMktData(tws,twsSTK("AAPL"))
works fine.
The manpage says:
twsOption(local,
expiry="",
strike="",
right="",
exch="SMART",
primary="",
currency='USD',
symbol='',
multiplier="100",
include_expired='0',
conId=0)
Option contracts on the TWS have certain rules which are different than standard data requests.
The local symbol is required. This can be found on the main TWS screen under contract details, or via the web at www.interactivebrokers.com
Since the local symbol is required, all other values are redundant. It is best to simply specify the local name and let the TWS manage the lookup.