Getting Started
KlawTrade is an algorithmic trading system that runs locally on your machine. It connects to the Alpaca brokerage API, executes strategies automatically, and provides a real-time web dashboard. You can go from installation to simulated trading in under five minutes.
Installation
Install KlawTrade from PyPI using pip. Python 3.10 or later is required.
pip install klawtradeThis installs the klawtrade CLI and all required dependencies including the trading engine, strategy framework, and web dashboard.
Quick Setup
Run the interactive setup wizard to configure your trading environment.
klawtrade initThe wizard walks you through several configuration steps:
- Starting capital -- how much simulated or real capital to allocate
- Risk profile -- conservative, moderate, or aggressive position sizing
- Alpaca API keys -- your paper or live trading credentials
- Always-on mode -- whether to run continuously or only during market hours
This generates a config/settings.yaml file and a .env file for your API credentials. You can edit these files directly at any time.
Start Trading
Launch the trading engine with a single command.
klawtrade startBy default, KlawTrade starts in simulation mode. No real orders are placed until you explicitly switch to live trading in the configuration. Simulation mode uses real market data but executes trades against a virtual portfolio, so you can validate your strategies without risk.
Dashboard
Once the engine is running, open the web dashboard in your browser.
http://localhost:8080The dashboard provides a real-time view of your trading system:
- Equity curve -- track your portfolio value over time
- Open positions -- see current holdings, P&L, and entry prices
- Trade history -- review all executed trades with timestamps and outcomes
- Kill switch -- immediately halt all trading and flatten positions with one click