From 5bf0ed911756199e4779380b65b7a8b205b7d0cf Mon Sep 17 00:00:00 2001 From: Jeff West Date: Thu, 15 Oct 2026 07:05:24 -0500 Subject: [PATCH] chore(release): v4.4.1 Orderbook get_statistics() uses pl.len() so trade-side counts work under polars 2.0. pl.count() no longer accepts zero arguments. Refs #168 --- .secrets.baseline | 4 ++-- CHANGELOG.md | 2 ++ README.md | 4 ++-- docs/changelog.md | 6 ++++++ docs/index.md | 4 ++-- examples/README.md | 4 ++-- src/project_x_py/__init__.py | 6 +++--- src/project_x_py/client/http.py | 2 +- src/project_x_py/indicators/__init__.py | 2 +- src/project_x_py/statistics/__init__.py | 2 +- 10 files changed, 22 insertions(+), 14 deletions(-) diff --git a/.secrets.baseline b/.secrets.baseline index 470b7e8..2c9b4c9 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -133,7 +133,7 @@ "filename": "CHANGELOG.md", "hashed_secret": "89a6cfe2a229151e8055abee107d45ed087bbb4f", "is_verified": false, - "line_number": 2553 + "line_number": 2568 } ], "README.md": [ @@ -216,5 +216,5 @@ } ] }, - "generated_at": "2026-10-04T15:46:59Z" + "generated_at": "2026-10-15T11:58:53Z" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d9052e..4c422aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [4.4.1] - 2026-10-15 + ### Fixed - Orderbook `get_statistics()` failed with "Analysis failed" under polars 2.0 diff --git a/README.md b/README.md index b2ee5bf..ae0c323 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,9 @@ A **high-performance async Python SDK** for the [ProjectX Trading Platform](http This Python SDK acts as a bridge between your trading strategies and the ProjectX platform, handling all the complex API interactions, data processing, and real-time connectivity. -## 🚀 v4.4.0 - Features is a StrEnum +## 🚀 v4.4.1 - orderbook statistics on polars 2.0 -**Latest Version**: v4.4.0 — `Features` is an `enum.StrEnum`. `str()` and f-strings of a member return the value (for example `"orderbook"`) instead of `"Features.ORDERBOOK"`. Equality, `.value`, and JSON are unchanged (#155). v4.3.3 bumps runtime cachetools to 7.2.0 (#150, #119). v4.3.2 skips the bounded-statistics counter sweep in `RealtimeDataManager.cleanup()` (#98). +**Latest Version**: v4.4.1 — orderbook `get_statistics()` uses `pl.len()` so trade-side counts work under polars 2.0 (`pl.count()` no longer accepts zero arguments) (#168). v4.4.0 makes `Features` an `enum.StrEnum` (#155). v4.3.3 bumps runtime cachetools to 7.2.0 (#150, #119). **Key changes**: - Official defaults: `https://api.topstepx.com` and `https://rtc.topstepx.com` diff --git a/docs/changelog.md b/docs/changelog.md index 29b4be9..624066b 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -9,6 +9,12 @@ The canonical changelog is the repository root [CHANGELOG.md](https://github.com ## [Unreleased] +## [4.4.1] - 2026-10-15 + +Orderbook `get_statistics()` uses `pl.len()` for trade-side counts so it +works under polars 2.0, where `pl.count()` no longer accepts zero +arguments (#168). See the root CHANGELOG for the full note. + ## [4.4.0] - 2026-10-04 `Features` is now an `enum.StrEnum`. `str()` and f-strings return the diff --git a/docs/index.md b/docs/index.md index 22c8bc7..a74aed6 100644 --- a/docs/index.md +++ b/docs/index.md @@ -7,8 +7,8 @@ **project-x-py** is a high-performance **async Python SDK** for the [ProjectX Trading Platform](https://www.projectx.com/) Gateway API. This library enables developers to build sophisticated trading strategies and applications by providing comprehensive async access to futures trading operations, real-time market data, Level 2 orderbook analysis, and 64 named indicators (Polars implementations; **not** a full TA-Lib port). -!!! note "Version 4.4.0" - **Latest Release**: TopstepX-only Gateway SDK (`api.topstepx.com` / `rtc.topstepx.com`) with native brackets, risk OCO and entry-order gating, stale-feed watchdog, `OrderSubmissionUncertainError`, and 64 named Polars indicators (not a full TA-Lib port). v4.4.0 makes `Features` an `enum.StrEnum`: `str()` and f-strings return the member value (for example `"orderbook"`) instead of `"Features.ORDERBOOK"`; equality, `.value`, and JSON are unchanged (#155). v4.3.3 bumps runtime cachetools to 7.2.0 (>=7.1.7); TTLCache use is unchanged and typing matches cachetools 7 stubs (#150, #119). v4.3.2 skips the bounded-statistics counter sweep in `RealtimeDataManager.cleanup()` so teardown does not read counters that are about to be discarded (#98). v4.3.1 coalesces `quote_update` / `market_depth` forwards so an RTH-open flood cannot starve `NEW_BAR` (#143). v4.3.0 added `aggregate_session_bars()` and reconnect health fixes (#140, #141). See the [v3 → v4 migration guide](migration/v3-to-v4.md). +!!! note "Version 4.4.1" + **Latest Release**: TopstepX-only Gateway SDK (`api.topstepx.com` / `rtc.topstepx.com`) with native brackets, risk OCO and entry-order gating, stale-feed watchdog, `OrderSubmissionUncertainError`, and 64 named Polars indicators (not a full TA-Lib port). v4.4.1 fixes orderbook `get_statistics()` under polars 2.0: trade-side counts use `pl.len()` because `pl.count()` no longer accepts zero arguments (#168). v4.4.0 makes `Features` an `enum.StrEnum`: `str()` and f-strings return the member value (for example `"orderbook"`) instead of `"Features.ORDERBOOK"`; equality, `.value`, and JSON are unchanged (#155). v4.3.3 bumps runtime cachetools to 7.2.0 (>=7.1.7); TTLCache use is unchanged and typing matches cachetools 7 stubs (#150, #119). v4.3.2 skips the bounded-statistics counter sweep in `RealtimeDataManager.cleanup()` so teardown does not read counters that are about to be discarded (#98). v4.3.1 coalesces `quote_update` / `market_depth` forwards so an RTH-open flood cannot starve `NEW_BAR` (#143). v4.3.0 added `aggregate_session_bars()` and reconnect health fixes (#140, #141). See the [v3 → v4 migration guide](migration/v3-to-v4.md). !!! note "Stable Production Release" This project maintains strict semantic versioning. v4.0.0 is a major release with documented breaking changes. Deprecation warnings are provided for at least 2 minor versions before removal. diff --git a/examples/README.md b/examples/README.md index 223e34c..014b7c6 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,6 +1,6 @@ -# ProjectX Python SDK Examples (v4.4.0) +# ProjectX Python SDK Examples (v4.4.1) -This directory contains working examples for the ProjectX Python SDK v4.4.0. All examples use **MNQ (Micro E-mini NASDAQ)** contracts to minimize risk during testing. +This directory contains working examples for the ProjectX Python SDK v4.4.1. All examples use **MNQ (Micro E-mini NASDAQ)** contracts to minimize risk during testing. **Note:** v4.0 is the TopstepX Gateway revival. Use `TradingSuite.create()`, `await suite.get_stats()` / `export_stats()`, and see `docs/migration/v3-to-v4.md` for breaking changes. diff --git a/src/project_x_py/__init__.py b/src/project_x_py/__init__.py index 4aacd6d..0547824 100644 --- a/src/project_x_py/__init__.py +++ b/src/project_x_py/__init__.py @@ -3,7 +3,7 @@ Author: @TexasCoding Date: 2026-08-29 -Version: 4.4.0 - Features is a StrEnum (#155) +Version: 4.4.1 - orderbook get_statistics() uses pl.len() (#168) Overview: A comprehensive Python SDK for the ProjectX Trading Platform Gateway API, providing @@ -96,7 +96,7 @@ It provides the infrastructure to help developers create their own trading applications that integrate with the ProjectX platform. -Version: 4.4.0 +Version: 4.4.1 Author: TexasCoding See Also: @@ -109,7 +109,7 @@ - `utils`: Utility functions and calculations """ -__version__ = "4.4.0" +__version__ = "4.4.1" __author__ = "TexasCoding" # Core client classes - renamed from Async* to standard names diff --git a/src/project_x_py/client/http.py b/src/project_x_py/client/http.py index 639f6a2..b0617bb 100644 --- a/src/project_x_py/client/http.py +++ b/src/project_x_py/client/http.py @@ -159,7 +159,7 @@ async def _create_client(self: "ProjectXClientProtocol") -> httpx.AsyncClient: verify=True, follow_redirects=False, headers={ - "User-Agent": "ProjectX-Python-SDK/4.4.0", + "User-Agent": "ProjectX-Python-SDK/4.4.1", "Accept": "application/json", }, ) diff --git a/src/project_x_py/indicators/__init__.py b/src/project_x_py/indicators/__init__.py index e1ae0dd..825d047 100644 --- a/src/project_x_py/indicators/__init__.py +++ b/src/project_x_py/indicators/__init__.py @@ -206,7 +206,7 @@ ) # Version info -__version__ = "4.4.0" +__version__ = "4.4.1" __author__ = "TexasCoding" diff --git a/src/project_x_py/statistics/__init__.py b/src/project_x_py/statistics/__init__.py index 17abbaa..bad1574 100644 --- a/src/project_x_py/statistics/__init__.py +++ b/src/project_x_py/statistics/__init__.py @@ -57,4 +57,4 @@ "CleanupScheduler", ] -__version__ = "4.4.0" +__version__ = "4.4.1"