Commit 7c69848
committed
refactor(client): Improve robustness and fix mypy issues in client module
This commit introduces a series of refactorings and fixes to the async client module to improve its robustness, maintainability, and type safety.
Key changes include:
- Replaced brittle msgpack DataFrame serialization with the robust Arrow IPC format in the caching layer.
- Simplified cache eviction logic by removing redundant manual TTL management and relying on cachetools built-in functionality.
- Consolidated the API for fetching open positions by deprecating `get_positions` in favor of the more consistent `search_open_positions`.
- Removed misleading placeholder values from the `get_health_status` method to ensure it returns only accurately tracked metrics.
- Hardened the parsing of instrument contract IDs with a more resilient regex-based approach.
- Resolved all mypy type-checking errors across the client module, including issues with untyped libraries and mixin protocols.1 parent 0ae60cb commit 7c69848
File tree
6 files changed
+131
-299
lines changed- src/project_x_py
- client
- types
6 files changed
+131
-299
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
0 commit comments