Skip to content

fix!: Support the recent ibapi changes #132

Merged
chipkent merged 8 commits into
mainfrom
reboot
Dec 1, 2025
Merged

fix!: Support the recent ibapi changes #132
chipkent merged 8 commits into
mainfrom
reboot

Conversation

@chipkent
Copy link
Copy Markdown
Collaborator

@chipkent chipkent commented Dec 1, 2025

This pull request updates the documentation and example scripts to improve virtual environment handling and contract definitions, refines tick type usage, and makes API and error handling more precise. The changes also clarify the order placement process and update various contract parameters for accuracy.

Virtual Environment and Documentation Improvements

  • Updated the README.md to recommend creating a temporary local virtual environment for running the dhib_env.py installer script, preventing system-wide package installations. Instructions for activating, using, and cleaning up the environment are now included.

Contract and Example Script Updates

  • Changed contract definitions in examples/example_all_functionality.py and examples/example_read_only_functionality.py to use updated symbols and parameters (e.g., ESM6, new expiry dates, and strikes for options). [1] [2] [3] [4]
  • Added tif = "DAY" to all sample orders for clarity and consistency in both example scripts. [1] [2] [3] [4] [5]

API and Error Handling Refinements

  • Modified the request_account_pnl method to require an explicit account argument, removing the default "All" value, and updated example scripts to pass the account parameter. [1] [2] [3]
  • Added new error codes to src/deephaven_ib/_internal/error_codes.py for improved feedback, including codes for indicative product valuation and order TIF preset. [1] [2]

Tick Type and Market Data Adjustments

  • Removed unsupported or deprecated tick types (NEWS, OPTION_VOLATILITY_HISTORICAL) from the codebase and updated tick type definitions to include delayed yield bid/ask. [1] [2] [3] [4] [5] [6]
  • Updated example scripts to default to delayed market data type and commented out real-time market data and news article requests for clarity. [1] [2]

Output and Logging Improvements

  • Improved output formatting in example scripts for readability by adding newlines to contract print statements and clarifying order placement logs. [1] [2] [3]

These changes enhance usability, maintainability, and clarity for users and developers working with the deephaven-ib integration.

- Update .gitignore to include .venv patterns and *.pyc files
- Improve README installation instructions to use a temporary installer virtual environment, avoiding system-wide package installation
- Update example contracts to use current expiration dates (ESM6 instead of ESM4, 202601 instead of 202409)
- Adjust strike prices in future options examples (7000 instead of 5000)
- Add newline formatting in contract output for better readability
- Add error code 2129 for indicative product valuation warnings
- Add error code 10349 for DAY TIF order preset notifications
…rameter

- Remove NEWS (292) generic tick type
- Replace OPTION_VOLATILITY_HISTORICAL (104) with DELAYED_YIELD_ASK (104)
- Add DELAYED_YIELD_BID (103) generic tick type
- Remove "All" default value from request_account_pnl account parameter
…F on orders

- Add explicit account parameter to request_account_pnl calls
- Set TIF to "DAY" on all order examples to avoid error code 10349
- Comment out request_news_article call
- Switch market data type to DELAYED from REAL_TIME
- Remove NEWS and OPTION_VOLATILITY_HISTORICAL from generic tick types
- Fix read-only example to properly demonstrate order placement instead of expecting failures
- Update actions/upload-artifact from v2 to v5 for ib-wheels and wheels artifacts
- Update actions/upload-artifact from v1 to v5 for documentation-html artifact
- Update actions/upload-artifact from v3 to v5 for JVM error log uploads
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request updates the deephaven-ib integration to support recent changes in the Interactive Brokers API (ibapi). The changes remove deprecated tick types, update example contracts to use current trading instruments, make the account PNL API more explicit, and improve the documentation for virtual environment setup.

Key Changes:

  • Removed deprecated tick types (NEWS, OPTION_VOLATILITY_HISTORICAL) and added new delayed yield tick types
  • Made request_account_pnl require an explicit account parameter instead of defaulting to "All"
  • Updated example contracts to use current symbols (ESM6), expiry dates (202601), and strikes (7000) reflecting 2025/2026 timeframes
  • Added explicit tif = "DAY" to all example orders for clarity
  • Improved README with a two-stage virtual environment setup to avoid system-wide package installations

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/deephaven_ib/_internal/error_codes.py Added error codes 2129 (indicative product valuation warning) and 10349 (order TIF preset notification)
src/deephaven_ib/init.py Removed deprecated tick types (NEWS, OPTION_VOLATILITY_HISTORICAL), added DELAYED_YIELD_BID/ASK; removed default "All" from request_account_pnl parameter
examples/example_read_only_functionality.py Updated contracts to ESM6/202601, added tif="DAY" to orders, switched to delayed market data, removed deprecated tick types, updated account_pnl call; contains a logging bug
examples/example_all_functionality.py Updated contracts to ESM6/202601, added tif="DAY" to orders, switched to delayed market data, removed deprecated tick types, updated account_pnl call; contains a logging bug
README.md Enhanced virtual environment setup with two-stage process using temporary .venv-installer to avoid system-wide installations
.gitignore Added .venv, .venv-*, and *.pyc patterns for better git hygiene

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread examples/example_read_only_functionality.py Outdated
Comment thread examples/example_all_functionality.py
- Update actions/setup-python to use Python 3.9 instead of 3.7
- Update actions/download-artifact from v3 to v5 across all workflow jobs
…cement examples

- Fix duplicate "START" message in example_all_functionality.py order placement
- Add try-except blocks in example_read_only_functionality.py to properly verify order placement failures
- Update print messages to clarify expected failure behavior in read-only example
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chipkent chipkent merged commit b929515 into main Dec 1, 2025
15 checks passed
@chipkent chipkent deleted the reboot branch December 1, 2025 22:10
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants