Metadata-Version: 2.4
Name: openstockengine
Version: 0.1.2
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Requires-Dist: typer>=0.9.0
Requires-Dist: rich>=13.0.0
Requires-Dist: websockets>=12.0
Requires-Dist: httpx>=0.25.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: torch>=2.0.0 ; extra == 'ai'
Requires-Dist: scikit-learn>=1.3.0 ; extra == 'ai'
Requires-Dist: pandas>=2.0.0 ; extra == 'ai'
Requires-Dist: numpy>=1.24.0 ; extra == 'ai'
Requires-Dist: pytest>=7.0.0 ; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0 ; extra == 'dev'
Requires-Dist: black>=23.0.0 ; extra == 'dev'
Requires-Dist: ruff>=0.1.0 ; extra == 'dev'
Requires-Dist: mypy>=1.5.0 ; extra == 'dev'
Requires-Dist: maturin>=1.4.0 ; extra == 'dev'
Provides-Extra: ai
Provides-Extra: dev
Summary: High-performance Hybrid Rust-Python Algorithmic Trading Framework
Author: OpenStock Team
License: AGPL-3.0-or-later
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# OpenStockEngine 🚀

> **Next-Generation Algorithmic Trading Framework (Rust Core + Python Strategy Layer)**

[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
[![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/)
[![Rust](https://img.shields.io/badge/rust-2021-orange.svg)](https://www.rust-lang.org/)

---

## 🌟 Key Features

- **Hybrid Architecture**: Ultra-fast, memory-safe Rust Core + Flexible Python Strategy Layer.
- **Zero-Copy Event Bus**: Lock-free MPMC queue powered by `crossbeam-channel` handling >1M events/second.
- **Deterministic Risk Engine**: Hard risk stops, portfolio accounting (FIFO & VWAP), position sizing.
- **Ecosystem Ready**: First-class integration with `OpenStockAPI`, `OpenStockConnector`, `OpenStockStudio`, and `OpenStockVisual`.
- **Asset Agnostic**: Support for VN Stock (lot 100, T+2), Crypto (Binance Spot/Futures), Forex, and US Stock.
- **WebSocket Streaming**: Push real-time events to `ws://localhost:8090` for Studio visualization and CLI dashboards.

---

## ⚡ Quick Start

### 1. Installation
```bash
pip install openstock-engine
```

### 2. Development Setup
```bash
# Build Rust crates and Python extension locally
maturin develop --release
```

### 3. Example Strategy
```python
from openstock_engine import Strategy, Bar

class SimpleMACrossover(Strategy):
    def initialize(self):
        self.fast_period = 5
        self.slow_period = 20

    def on_bar(self, bar: Bar):
        # Your trading logic here
        pass
```

---

## 📚 Documentation

Detailed documentation and roadmap are available in the [Docs/Developement_plan/](./Docs/Developement_plan/) directory:
- [01 — Vision & Positioning](./Docs/Developement_plan/01_vision_and_positioning.md)
- [02 — System Architecture](./Docs/Developement_plan/02_system_architecture.md)
- [03 — Core Modules Specification](./Docs/Developement_plan/03_core_modules_spec.md)
- [04 — Ecosystem Integration](./Docs/Developement_plan/04_ecosystem_integration.md)
- [05 — Development Roadmap](./Docs/Developement_plan/05_development_roadmap.md)
- [06 — Tech Stack & Tooling](./Docs/Developement_plan/06_tech_stack_and_tooling.md)
- [07 — Directory Structure](./Docs/Developement_plan/07_directory_structure.md)
- [08 — Testing Strategy](./Docs/Developement_plan/08_testing_strategy.md)
- [09 — Distribution Strategy](./Docs/Developement_plan/09_distribution_strategy.md)

