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.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.1.2
File Size Uploaded Provenance Actions
openstockengine-0.1.2.tar.gz 342.8 kB Without provenance Details for openstockengine-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 848.5 kB

Release files / openstockengine-0.1.2.tar.gz

Download URL openstockengine-0.1.2.tar.gz
Size 342.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4db41cd58e286da7f3cdbf994f7fec1b093037bd686d2f0e41a29171a517be1f
BLAKE2b-256 checksum
How to use checksums
ec69fae55c465de93018a0b9acc1e9e3112d604ff8fb55a903e99124a993930e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

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

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

Security for openstockengine 0.1.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