Skip to content

Fenix v2.0

Choose a tag to compare

@TheHardeep TheHardeep released this 18 Jun 20:00
· 7 commits to master since this release

Fenix

Fenix v2.0

Fenix v2.0 is a major release focused on safer strategy development, a cleaner broker foundation, and expanded broker coverage for Indian markets. This release introduces a first-class paper-trading engine, modernizes the shared broker architecture, and refreshes packaging metadata to match the new public API surface.

Key Highlights

First-class paper trading

  • Added the new fenix.paper package with a dedicated execution client, matching engine, and in-memory session state.
  • Added paper_mode=True support across broker adapters so order entry and account reads can be routed through the paper engine instead of live broker endpoints.
  • Added tick-driven fills through on_tick() for market simulation against LTP, bid, and ask updates.
  • Added paper-mode support for order books, trade books, order history, positions, holdings, margin limits, and profile data.
  • Added validation for invalid sides, stop-order trigger placement, unsupported order shapes, square-off overshoots, and missing orders.

Expanded broker coverage

  • Added new broker adapters for AnandRathi, Dhan, and Groww.
  • Updated the public fenix.brokers registry so supported broker classes are exported consistently.
  • Removed deprecated broker modules: choice, kotak, kunjee, and vpc.

Broker architecture refactor

  • Refactored the shared Broker base class and broker adapters for a more consistent capability model.
  • Added generated order-helper coverage and centralized order-variant capability metadata.
  • Improved request/session handling, authentication restoration hooks, rate-limit bookkeeping, and broker-specific error mapping.
  • Expanded shared constants and exception types used across broker implementations.

Logging, diagnostics, and safety

  • Added structured debug logging for HTTP requests/responses and paper-mode interactions.
  • Added sensitive-field redaction for tokens, passwords, API keys, and other configured secrets.
  • Added request and response snapshots for live HTTP calls and synthetic paper-mode operations.
  • Added PEP 561 typing support through the packaged py.typed marker.

Packaging and compatibility

  • Updated runtime support to Python >=3.10 to reflect the modern type syntax used throughout v2.0.
  • Updated package keywords to reflect the current broker list.
  • Removed stale runtime dependencies that are no longer imported by the library.

Tests and documentation

  • Added tests for paper trading, logging, generated order helpers, and broker-specific paper-mode flows.
  • Added paper-mode rollout documentation under docs/.

Breaking Changes

  • Python 3.8 and 3.9 are no longer advertised as supported.
  • Deprecated broker modules choice, kotak, kunjee, and vpc have been removed.
  • The packaging metadata and broker keywords now reflect the v2.0 broker surface.

Upgrade Notes

  • Use Python 3.10 or newer.
  • Review imports if your code referenced removed broker modules.
  • For dry runs or strategy validation, instantiate supported brokers with paper_mode=True and feed market updates through on_tick().