Fix Interactive Brokers options chain issue #2711
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
NautilusTrader prioritizes correctness and reliability, please follow existing patterns for validation and testing.
Summary
Added optional "options_chain_exchange" parameter to IBcontract. Change option chain request to use this new parameter as exchange for options, if this parameter is not set will use underlying's exchange.
This allow using a different exchange than the underlying's, be it "SMART" or others.
ib doc updated accordingly
Related Issues/PRs
Close issue #2622
Type of change
Breaking change details (if applicable)
Before : by default for US markets, "SMART" was applied as exchange for options. Use of ANY other exchange, including US ones was impossible
Now : Those who wish "SMART" exchange, or an exchange different from the underlying's have to specify it with options_chain_exchange parameter. Use of the underlying's exchange is now functional and automatically done just by not using this parameter.
Release notes
RELEASES.md
that follows the existing conventions (when applicable)Testing
Ensure new or changed logic is covered by tests.
unit tests for usual IBcontract (excluding options chain)
used MRE in #2622 and modified it to check various exchanges.