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 openstockengine

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.2.2

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.2.2
File Size Uploaded Provenance Actions
openstockengine-0.2.2.tar.gz 524.8 kB Without provenance Details for openstockengine-0.2.2.tar.gz

Built distribution (wheel)

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

Total release size: 1.3 MB

Release files / openstockengine-0.2.2.tar.gz

Download URL openstockengine-0.2.2.tar.gz
Size 524.8 kB
Tags Source
SHA-256 checksum
How to use checksums
232442ae73cad763265171abe3959af27abfa1d917338d93f201d8bfe8bed549
BLAKE2b-256 checksum
How to use checksums
b463c7f6d4336e49464138a813f356858ab2fb23986839964324f3dcfaf543f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

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

Download URL openstockengine-0.2.2-cp310-abi3-win_amd64.whl
Size 810.4 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
4c3d2e457634926315eacbfcc0af81ce0ba394e1cfde4ffa1c645547aaa8f410
BLAKE2b-256 checksum
How to use checksums
23cfcfd532cdab959ddcfb1d48dabf240e61ece492d61bbb6b956352db8a458f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Security for openstockengine 0.2.2

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