Skip to content

Bump ib-async from 1.0.3 to 2.0.1 #504

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jun 23, 2025

Bumps ib-async from 1.0.3 to 2.0.1.

Release notes

Sourced from ib-async's releases.

v2.0.1

First "proper release" in almost a year. Includes many bug fixes and new usability helpers.

Thanks to contributors, people who continue to provide ongoing donations, and thanks to @​gnzsnz for his continual consistent rapid replies and feedback on support/development issues.

Changes

Commit Changelog: ib-api-reloaded/ib_async@v1.0.3...v2.0.1

Code diff: ib-api-reloaded/ib_async@v1.0.3...v2.0.1

Docs Changelog: https://ib-api-reloaded.github.io/ib_async/changelog.html#ib-async-changelog

New Feature Highlights

One large usability improvement in this release is now you can specify your own custom values for "no price" or "no size" or "no value available" situations. Previously, the library only passed through IBKR API default values of empty prices being -1 and empty sizes being 0 and unset values being nan. These defaults are actually somewhat dangerous because in some circumstances, negative prices are valid, so if you only consume prices without checking "is this -1 a real value or not?" you can end up with unexpected results.

Now, customizing your own empty/zero value defaults can greatly simplify your logic and improve code correctness instead of having to check for all combinations or price and size and unset possibilities everywhere.

Also, you can specify a default timezone for the objects to populate instead of UTC as well.

Here's a simple example of the new default setting mechanism, but you could also use custom objects for EmptyPrice or EmptySize or UnsetValue if you wanted.

USEastern: Final = pytz.timezone("US/Eastern")  
Set custom values for unpopulated API values
ib_async.IB(defaults=IBDefaults(emptyPrice=None, emptySize=None, unset=None, timezone=USEastern))
If you don't specify a defaults parameter, it just uses the original behavior of:
ib_async.IB(defaults=IBDefaults(emptyPrice=-1, emptySize=0, unset=float("nan"), timezone=datetime.timezone.utc))

Additionally, there are more bug fixes and quality of life enhancements:

  • Bag contracts (spreads) can now be hashed, so they can be used in more places
  • The greeks object now supports native math operations against the objects themselves, so you can generate spread greeks easily by just adding, subtracting, or multiplying greeks objects directly as whole entities
  • Bug fixes around orders being deleted incorrectly during "validation errors" which were just warnings but the orders were still live
  • OrderState objects (where all prices are just strings) now support conversion to direct numeric values instead.
  • a workaround bugfix for IBKR returning incorrect contract types if multiple exist on the same expiration (i.e. IBKR returns Event Contract results when trying to qualify only Futures Options, which is clearly a bug? So now we just workaround it more directly by rejecting alternative contract types than we requested directly)
  • Adds 5 new tick types we weren't processing before: volumeRate3Min, volumeRate5Min, volumeRate10Min, shortable
  • Added more logging to report if unknown data types are arriving from the API we need to start reading
  • Restructured the README a little. Feedback welcome for better ways to continue organizing it.
Changelog

Sourced from ib-async's changelog.

ib_async Changelog

2.0

Version 2.0.1 (2025-06-22) ^^^^^^^^^^^^^^^^^^^^^^^^^^

Minor dependency change to fix pypi package building.

Dependency Fix

The eventkit dependency is now aeventkit because eventkit is locked behind a closed account and pypi doesn't allow dependencies with direct github URL tags.

Version 2.0.0 (2025-06-13) ^^^^^^^^^^^^^^^^^^^^^^^^^^

This major release includes significant new features, performance improvements, and critical bug fixes. The most notable addition is the custom defaults system, allowing users to customize how ib_async handles empty values and timestamps throughout the library.

Added

  • Custom Default Values: Major new feature allowing customization of default values used throughout the library via IBDefaults object passed to IB() constructor

    • Customize emptyPrice, emptySize, unset values, and timezone settings
    • Replace IBKR's default values (emptyPrice=-1, emptySize=0, unset=nan) with your preferred defaults (e.g., None)
    • Set custom timezone for timestamp display (e.g., pytz.timezone("US/Eastern") instead of UTC)
  • Enhanced Ticker Data: New ticker fields for improved market data analysis

    • timestamp: Float format timestamp for easier mathematical operations alongside existing time field
    • shortable: Shortability score (0-3) for instruments
    • volumeRate3Min, volumeRate5Min, volumeRate10Min: IBKR-provided volume acceleration metrics
    • lastTimestamp: Timestamp of the last trade event
  • OrderStatus Enhancements: Extended order management capabilities

    • New API status states added to OrderStatus enum
    • totalQuantity() method to report total order quantity
    • Additional helper methods for reading order states
  • OrderState Conversion Helpers: New utility methods for OrderState objects

    • numeric(): Convert string values to numbers with optional digit rounding
    • formatted(): Convert values to comma-separated formatted strings
    • Both methods handle UNSET_DOUBLE values automatically
  • OptionComputation Mathematical Operations: Options can now be added, subtracted, and multiplied

    • Enables direct calculation of Greeks for spreads (e.g., vertical spreads: longGreeks - shortGreeks)

... (truncated)

Commits
  • 2afdae4 New release: 2.0.1
  • cbc5b67 New release: 2.0.0
  • 9f9b349 Refactor README a little
  • 93fa275 Add some pypy versions to CI building too
  • 96d7cf4 Add changelog commit summary for 2.0 release
  • 89fefe0 Add Python 3.13 to CI test matrix
  • f587e94 Reformat for style
  • 0a6c078 Create contract-from-params abstraction
  • d9b8d57 Fix bug with some bulk data tick types
  • e457696 Workaroud TWS API bug for bad FOP contract matches
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [ib-async](https://github.com/ib-api-reloaded/ib_async) from 1.0.3 to 2.0.1.
- [Release notes](https://github.com/ib-api-reloaded/ib_async/releases)
- [Changelog](https://github.com/ib-api-reloaded/ib_async/blob/main/docs/changelog.rst)
- [Commits](ib-api-reloaded/ib_async@v1.0.3...v2.0.1)

---
updated-dependencies:
- dependency-name: ib-async
  dependency-version: 2.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants