diff --git a/CHANGELOG.md b/CHANGELOG.md index 248d9a8..89d00bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [v1.0.4] - 2021-03-15 +Hotfix `IBBridge.req_historical_ticks`. + +### Fixed +- Issue of the recursive historical ticks requests won't have its' next start + time advanced when IB returns only 1 tick which is earlier than the start + time requested for that iteration of request. + ## [v1.0.3] - 2021-03-14 Hotfix `IBBridge.req_historical_ticks`. @@ -199,7 +207,8 @@ returns with `finished` mark as `True` unexpectedly while IB returns less than 1000 records but there're more historical ticks those should be fetched in next request. -[Unreleased]: https://github.com/Devtography/ibpy_native/compare/v1.0.3...HEAD +[Unreleased]: https://github.com/Devtography/ibpy_native/compare/v1.0.4...HEAD +[v1.0.4]: https://github.com/Devtography/ibpy_native/compare/v1.0.4...v1.0.3 [v1.0.3]: https://github.com/Devtography/ibpy_native/compare/v1.0.3...v1.0.2 [v1.0.2]: https://github.com/Devtography/ibpy_native/compare/v1.0.2...v1.0.1 [v1.0.1]: https://github.com/Devtography/ibpy_native/compare/v1.0.1...v1.0.0 diff --git a/ibpy_native/bridge.py b/ibpy_native/bridge.py index c0206fb..a443c8d 100644 --- a/ibpy_native/bridge.py +++ b/ibpy_native/bridge.py @@ -456,6 +456,10 @@ async def req_historical_ticks( # the start time of this iteration. ticks = ticks[i:] break + if i == len(ticks) - 1: + # Only 1 tick received and that record is earlier the + # requested start time. + ticks = [] if ticks: # Determine if it should fetch next batch of data diff --git a/setup.py b/setup.py index f72dc16..b098239 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ # For a discussion on single-sourcing the version across setup.py and the # project code, see # https://packaging.python.org/en/latest/single_source_version.html - version="1.0.3", # Required + version="1.0.4", # Required # This is a one-line description or tagline of what your project does. This # corresponds to the "Summary" metadata field: # https://packaging.python.org/specifications/core-metadata/#summary