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

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.1
File Size Uploaded Provenance Actions
openstockengine-0.2.1.tar.gz 524.9 kB Without provenance Details for openstockengine-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 1.3 MB

Release files / openstockengine-0.2.1.tar.gz

Download URL openstockengine-0.2.1.tar.gz
Size 524.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d6e794ad4f74e1478c8d9ca4c8e040f2e40cacd0d9608cca5bf53bf7150e8198
BLAKE2b-256 checksum
How to use checksums
0b8f15c9fdd9054d3468e01d02f6232bc62e76e7cc62439df4387ebc1920147f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

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

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

Security for openstockengine 0.2.1

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