There's a bug in reqSecDefOptParams—the returned OptionChains' underlyingConId field is returned as a string, whereas it's typed as int.
Minimal example:
opt_chains = ibkr.reqSecDefOptParams(
underlyingSymbol="AAPL",
futFopExchange="",
underlyingSecType="STK",
underlyingConId=265598,
)
print(repr(opt_chains[0].underlyingConId))
print(type(opt_chains[0].underlyingConId))
Output:
Expected: underlyingConId to be int.
The issue is in Decoder.securityDefinitionOptionParameter: underlyingConId is destructured as a str and should, similarly to what is done for n, be converted to int.
Do you accept PRs? Or is the main branch frozen (in light of the ongoing protobuf implementation)?
There's a bug in
reqSecDefOptParams—the returnedOptionChains'underlyingConIdfield is returned as a string, whereas it's typed as int.Minimal example:
Output:
Expected:
underlyingConIdto beint.The issue is in
Decoder.securityDefinitionOptionParameter:underlyingConIdis destructured as astrand should, similarly to what is done forn, be converted toint.Do you accept PRs? Or is the main branch frozen (in light of the ongoing protobuf implementation)?