crypto-trader
Automated cryptocurrency trading skill for OpenClaw. Supports 8 trading strategies (Grid Trading, DCA, Trend Following, Scalping, Arbitrage, Swing Trading, C...
Automated cryptocurrency trading skill for OpenClaw. Supports 8 trading strategies (Grid Trading, DCA, Trend Following, Scalping, Arbitrage, Swing Trading, C...
Real data. Real impact.
Growing
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
Automated cryptocurrency trading with 8 strategies, multi-exchange support, AI sentiment analysis, and comprehensive risk management.
Important: By default all operations run against testnet (paper trading). Set
CRYPTO_DEMO=false only when you are absolutely certain the user wants to trade with real money.
Install dependencies once from the skill directory:
pip install -r {baseDir}/requirements.txt
Required environment variables (set in
.env or via OpenClaw settings):
BINANCE_API_KEY and BINANCE_API_SECRET (required for Binance)CRYPTO_DEMO=true (default: paper trading mode)Optional:
BYBIT_API_KEY, BYBIT_API_SECRET (for Bybit)KRAKEN_API_KEY, KRAKEN_API_SECRET (for Kraken)COINBASE_API_KEY, COINBASE_API_SECRET (for Coinbase)TELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_ID (for Telegram alerts)DISCORD_WEBHOOK_URL (for Discord alerts)CRYPTOPANIC_API_KEY (for sentiment analysis)python3 {baseDir}/scripts/main.py --mode status
Returns JSON with:
Use when the user asks: "How is my portfolio?", "What's running?", "Give me an overview."
python3 {baseDir}/scripts/main.py --mode balance python3 {baseDir}/scripts/main.py --mode balance --exchange binance
Returns balances for the specified exchange (or all exchanges). Shows total, free, and used amounts per asset.
Use when the user asks: "How much BTC do I have?", "What's my balance?", "Show my funds."
python3 {baseDir}/scripts/main.py --mode start_strategy --strategy grid --params '{"symbol":"BTC/USDT","price_range":[90000,110000],"num_grids":10,"order_amount_usdt":10}' python3 {baseDir}/scripts/main.py --mode start_strategy --strategy dca --params '{"symbol":"ETH/USDT","interval":"daily","amount_per_buy_usdt":5}' python3 {baseDir}/scripts/main.py --mode start_strategy --strategy trend --params '{"symbol":"BTC/USDT","timeframe":"4h"}'
Supported strategies:
| Strategy | Name | Description |
|---|---|---|
| Grid Trading | | Buy/sell at evenly spaced price levels within a range |
| DCA | | Buy fixed amounts at regular intervals |
| Trend Following | | EMA crossover + RSI signals |
| Scalping | | Fast small trades on spread/momentum |
| Arbitrage | | Cross-exchange price difference exploitation |
| Swing Trading | | Bollinger Bands + MACD, hold 2-14 days |
| Copy Trading | | Replicate trades from tracked wallets/traders |
| Rebalancing | | Maintain target portfolio allocation |
Each strategy uses defaults from
config/strategies.yaml which can be overridden via --params.
CRITICAL: Always confirm with the user before starting a strategy. Show the parameters clearly and ask for approval.
Use when the user asks: "Start grid trading on BTC", "I want to DCA into ETH", "Follow the trend on SOL."
python3 {baseDir}/scripts/main.py --mode stop_strategy --strategy-id <id>
Stops a specific strategy instance. The strategy ID is returned when starting and shown in the list.
python3 {baseDir}/scripts/main.py --mode list_strategies
Returns all available and running strategies with their status, parameters, and performance stats.
python3 {baseDir}/scripts/main.py --mode backtest --strategy grid_trading --params '{"symbol":"BTC/USDT","price_range":[40000,50000],"num_grids":10}' --start 2025-01-01 --end 2025-12-31 python3 {baseDir}/scripts/main.py --mode backtest --strategy dca --params '{"symbol":"BTC/USDT","interval":"daily","amount_per_buy_usdt":10}' --start 2025-06-01 --end 2025-12-31 python3 {baseDir}/scripts/main.py --mode backtest --strategy trend_following --params '{"symbol":"BTC/USDT","timeframe":"4h"}' --start 2025-01-01 --end 2025-12-31
Returns performance metrics:
Results are saved to
data/backtests/.
Use when the user asks: "Would grid trading have worked?", "Backtest DCA on ETH", "Test this strategy."
python3 {baseDir}/scripts/main.py --mode history --days 7 python3 {baseDir}/scripts/main.py --mode history --days 30
Returns completed orders from all exchanges for the last N days.
python3 {baseDir}/scripts/main.py --mode sentiment --symbol BTC python3 {baseDir}/scripts/main.py --mode sentiment --symbol ETH
Analyzes sentiment from:
Returns aggregate score (-1.0 to 1.0) with labels: very_bearish, bearish, neutral, bullish, very_bullish.
Use when the user asks: "What's the market sentiment?", "Is BTC bullish right now?", "Any news about ETH?"
python3 {baseDir}/scripts/main.py --mode monitor --action start python3 {baseDir}/scripts/main.py --mode monitor --action status python3 {baseDir}/scripts/main.py --mode monitor --action stop
The monitoring daemon runs in the background and:
python3 {baseDir}/scripts/main.py --mode emergency_stop
Immediately:
The kill switch must be manually deactivated before trading can resume.
Use when the user says: "Stop everything!", "Emergency!", "Kill all trades."
Exchange connectivity settings, sandbox mode, rate limits.
Default parameters for each strategy. Users can override via
--params.
Risk management rules:
max_position_size_pct: Max portfolio % per position (default: 25%)max_daily_loss_eur: Emergency stop on daily loss (default: 50 EUR)max_drawdown_pct: Stop at drawdown from ATH (default: 15%)max_order_size_eur: Max per order (default: 100 EUR)max_open_orders: Max concurrent orders (default: 50)Alert routing rules per event type and channel.
CRYPTO_DEMO=true). Remind the user which mode is active.CRYPTO_DEMO=false, warn the user clearly that this uses real money.All modes return structured JSON to stdout. Parse it and present a human-readable summary to the user. Highlight important numbers (P&L, prices, risk metrics). Use clear formatting with tables where appropriate.
cd {baseDir} pip install pytest python -m pytest tests/ -v
Check that the API key and secret are set in environment variables for the target exchange.
Verify your API keys are correct and not expired. For testnet, make sure you're using testnet keys.
The skill automatically retries with backoff. If persistent, reduce strategy evaluation frequency.
The emergency stop was triggered. Review what happened, then deactivate: The kill switch state is stored in
~/.openclaw/.crypto-trader-risk-state.json. Set "killed": false to reset, or use a future CLI command to deactivate.No automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.