Skip to content

Quick Start

  • Rust 1.76+
  • fontconfig and freetype development libraries

On Debian/Ubuntu:

Terminal window
sudo apt-get install libfontconfig1-dev libfreetype-dev
Terminal window
git clone https://github.com/5queezer/chartgen.git
cd chartgen
cargo build --release
Terminal window
cargo run -- --symbol AAPL --interval 1d \
-p ema_stack -p vpvr -p rsi -p macd \
--output chart.png

Symbols ending in USDT, BTC, or ETH are fetched from Binance; everything else falls back to Yahoo Finance.

For Claude Desktop (stdio):

Terminal window
cargo run -- --mcp

For Claude.ai (HTTP + OAuth 2.1 PKCE):

Terminal window
cargo run -- --serve --port 9315

--trade streams a live Binance WebSocket feed, runs the alert engine, and exposes the order / position / alert MCP tools over the same HTTP + OAuth server as --serve:

Terminal window
cargo run -- --trade --testnet --symbol BTCUSDT --interval 1h --port 9315

--trade and --serve are mutually exclusive — mode dispatch in src/main.rs picks the first match and returns. Use --trade when you want the trading engine (it already serves HTTP); use --serve when you only need the charting tools. State lives under ~/.chartgen/ (alerts.json, trades.log, subscriptions.json).

Terminal window
cargo test
cargo fmt --check
cargo clippy -- -D warnings