Skip to main content

Ultra-clean, fast, and safe live trading framework for complex crypto strategies.

Project description

Crystrat

Ultra-clean, fast, and safe live trading framework for complex strategies.

Milestones M0–M2 are implemented: bootstrap, Crypto.com market data (trades/bars/books) with metrics, and a paper OMS/Execution pipeline.

Quick Start

  • Create venv and install editable:
    • PowerShell: python -m venv .venv; .\.venv\Scripts\Activate.ps1; pip install -e .
    • If the crystrat script is not on PATH, use python -m crystrat.cli.main.
  • Configure config.example.yaml:
    • exchanges: [cryptocom] to enable live market data
    • bar_intervals: [1m] to build OHLCV bars
    • book_depth: 50 for L2 depth

Run Examples

  • Print trades (Crypto.com):
    • python -m crystrat.cli.main run --config config.example.yaml --strategy examples.print_trades:PrintTrades
  • Print bars (requires bar_intervals):
    • python -m crystrat.cli.main run --config config.example.yaml --strategy examples.print_bars:PrintBars
  • Demo order (paper OMS, fills at top-of-book):
    • python -m crystrat.cli.main run --config config.example.yaml --strategy examples.demo_order:DemoOrder
  • Minimal starter:
    • python -m crystrat.cli.main run --config config.example.yaml --strategy examples.simple_strategy:MyStrat

Commands

  • crystrat run loads config and strategy, starts the runtime.
  • crystrat status prints basic environment and version.

Layout

  • src/crystrat/infra/* event bus, logging, config, metrics
  • src/crystrat/connect/crypto_com/* Crypto.com REST + WS connectors
  • src/crystrat/marketdata/* MD runtime and OHLCV
  • src/crystrat/exec/* OMS/Execution (router, paper broker, risk)
  • src/crystrat/strategy/* Strategy base + loader
  • src/crystrat/cli/* CLI entrypoints
  • examples/* demo strategies
  • tests/* minimal sanity tests

Refer to plan.txt and TODO.md for the detailed roadmap and progress.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crystrat-0.0.1.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crystrat-0.0.1-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

Details for the file crystrat-0.0.1.tar.gz.

File metadata

  • Download URL: crystrat-0.0.1.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for crystrat-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d03a111d7205424de4c949012a77979c9daffbf02e73ad876e21c78140cb4676
MD5 0f3562ebb58df1d2636f35c7e6d5f4d0
BLAKE2b-256 b55260eaf11bc774911a3cc3436df59ea9c3fe52ada075eb45eda9be2fa8aa3b

See more details on using hashes here.

File details

Details for the file crystrat-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: crystrat-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 21.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for crystrat-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d644ba2f8c7a771325c441bad21e683f6139b3d9a8aea50122562b78cea58038
MD5 f0e79c78ad154456b27978a1e3d4ccee
BLAKE2b-256 b2a7da2c6143dd5ae60c125c9e35aeca680b5df2bbfb80415eae3b6801b73255

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page