Skip to content

watthem/matchstick-trading

Repository files navigation

Matchstick Trading

Low-latency trading infrastructure. Rust core. Cross-platform. Local-first.

License: MIT Rust

Cross-platform trading tools that don't crash at 3 AM.

Matchstick doesn't simulate markets. It simulates you—your strategy, your decisions, your risk discipline—across randomized historical and synthetic scenarios.

Demo Repository

What's public: CLI/TUI interfaces with working demos.
What's proprietary: Production engine (50+ indicators, risk models, broker integrations).

The demo proves engineering quality. The proprietary code is the business. See DEMO_NOTICE.md.

Why It Exists

  • Sub-millisecond operations - Rust core, zero-cost abstractions
  • Actually cross-platform - macOS, Linux, Windows from day one
  • CLI-first - Developer-friendly, automation-ready
  • Local-first - Your data stays on your machine
  • Built by traders - For people who actually trade

Quick Start

Install from Source

# Clone the repository
git clone https://github.com/watthem/matchstick-trading.git
cd matchstick-trading

# Install CLI
cargo install --path matchstick-cli

# Install TUI
cargo install --path matchstick-tui

CLI Usage

# Initialize a new strategy project
matchstick init my-strategy

# Run a demo backtest
matchstick run --strategy my-strategy

# Connect to mock endpoint
matchstick connect ws://localhost:8080

# Interactive mode
matchstick play

# Submit feedback
matchstick feedback "Great tool!"

TUI Usage

# Launch the terminal interface (welcome screen)
matchstick-tui

# Demo mode with live mock data
matchstick-tui --demo

What's Implemented (Demo)

✅ CLI commands with minimal implementations ✅ TUI with simulated market data ✅ Interactive REPL mode ✅ Project scaffolding ✅ Mock backtesting output ✅ Feedback collection

What's Coming (Production)

  • v0.1.0: Real strategy backtesting engine
  • v0.2.0: Live data integration
  • v0.3.0: Order management system
  • v1.0.0: Production trading platform

See our full roadmap →

Architecture

  • Rust core - Memory safety without garbage collection overhead
  • Separate binaries - CLI and TUI share code, ship standalone
  • Demo mode - Test without real money, explore without limits
  • Cross-platform - Same code, all platforms

Repository Structure

matchstick-trading/
├── matchstick-cli/      # Command-line interface
│   └── src/main.rs      # CLI implementation
├── matchstick-tui/      # Terminal user interface
│   └── src/main.rs      # TUI implementation
├── Cargo.toml           # Workspace configuration
├── README.md            # This file
├── DEMO_NOTICE.md       # Important: Read this first
├── CONTRIBUTING.md      # Contribution guidelines
└── LICENSE              # MIT License

Development

# Build all components
cargo build --release

# Run tests
cargo test

# CLI development
cd matchstick-cli
cargo run -- init test-strategy

# TUI development
cd matchstick-tui
cargo run -- --demo

# Format code
cargo fmt

# Run clippy
cargo clippy

Contributing

We welcome contributions! Please see our Contributing Guide for details.

What We Accept

Demo Improvements: New CLI commands, TUI enhancements ✅ Documentation: Better examples, tutorials, explanations ✅ Bug Fixes: Issues with demo functionality ✅ UI/UX: Polish for terminal interface

Production Features: Developed privately (see DEMO_NOTICE.md)

Issues & Feedback

Screenshots

CLI in Action

$ matchstick init my-strategy
✨ Initializing my-strategy

✓ Project created successfully!

Next steps:
  cd my-strategy
  cargo run

TUI Demo Mode

┌─────────────────────────────────────────┐
│ Matchstick TUI v0.0.2 [DEMO MODE]      │
├─────────────────────────────────────────┤
│ Portfolio Stats                         │
│ Total P&L: $1,250.00 | Win Rate: 63.8% │
├─────────────────────────────────────────┤
│ Live Market Data (Simulated)           │
│ BTCUSD   $65,321.50   +2.3%             │
│ ETHUSD   $3,212.30    -1.1%             │
│ AAPL     $189.45      +0.4%             │
└─────────────────────────────────────────┘

License

MIT License - see LICENSE for details.

Links


Built for traders who code.

Production features: matchstick.trading

About

No description, website, or topics provided.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages