Skip to main content

OpenStockEngine 🚀

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

License Python Rust


🌟 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

pip install openstock-engine

2. Development Setup

# Build Rust crates and Python extension locally
maturin develop --release

3. Example Strategy

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/ directory:

Metadata

Release files for openstockengine 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openstockengine 0.1.0
File Size Uploaded Provenance Actions
openstockengine-0.1.0.tar.gz 340.9 kB Without provenance Details for openstockengine-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for openstockengine 0.1.0
File Interpreter ABI Platform Actions
openstockengine-0.1.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for openstockengine-0.1.0-cp310-abi3-win_amd64.whl

Total release size: 844.7 kB

Release files / openstockengine-0.1.0.tar.gz

Download URL openstockengine-0.1.0.tar.gz
Size 340.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c74a066f145a26bc8ae7fa3d4c239e6913ce3a1abdc3fc5eeee55a5ff8462140
BLAKE2b-256 checksum
How to use checksums
54c9d8bce4b7cd1e94270965554f39877a6ce7dbb396cbacf0e6c1202215f384
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / openstockengine-0.1.0-cp310-abi3-win_amd64.whl

Download URL openstockengine-0.1.0-cp310-abi3-win_amd64.whl
Size 503.8 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
2a8990328c2b08f474ea45801d0765d6a7d1acd560e9471f9b304cf2f44ca692
BLAKE2b-256 checksum
How to use checksums
b9399a9cdc270c294fef12ed448a385f896fd36fd01bf8b30102640cddd64591
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Security for openstockengine 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page