CLI Commands
tradectl login
Authenticate with the platform using an API key.
echo "st_live_<your-key>" | tradectl loginExchanges the API key for a signed JWT license token (72h expiry). The token is stored locally and refreshed automatically.
tradectl init <name>
Scaffold a new strategy project.
tradectl init my-strategyCreates a Rust project with src/lib.rs, src/params.rs, config.json, tests, and a STRATEGY.md template. Automatically resolves the SDK dependency (local path or crates.io).
tradectl auth
Manage exchange API credentials.
tradectl auth set binance # Set credentials for an exchange
tradectl auth list # List configured exchanges
tradectl auth remove binance # Remove exchange credentialsSupported exchanges: binance, bybit, hyperliquid.
tradectl build
Build the strategy binary.
tradectl buildCompiles the strategy in release mode as a dynamic library (cdylib).
tradectl run
Run a strategy (paper or live).
tradectl run --config config.json
tradectl run --config config.json --daemon # Background mode
tradectl run --config config.json --dry-run # Validate only| Flag | Description |
|---|---|
--config <PATH> | Path to config file |
--daemon | Run in background as detached process |
--dry-run | Validate config and load strategy without starting |
tradectl stop
Stop a running bot.
tradectl stop --config config.json # Stop specific bot
tradectl stop --all # Stop all botstradectl status
Show status of running bots.
tradectl status # All bots
tradectl status --config config.json # Specific bottradectl logs
View bot logs.
tradectl logs # All logs
tradectl logs --config config.json # Specific bot
tradectl logs --config config.json --follow # Tail logs
tradectl logs --lines 100 # Last 100 lines| Flag | Description | Default |
|---|---|---|
--config <PATH> | Filter to specific bot | all |
-f, --follow | Follow log output (like tail -f) | false |
-n, --lines <N> | Number of lines to show | 50 |
tradectl backtest
Run a local backtest.
tradectl backtest \
-d data/prepared.bin \
--leverage 5 \
--taker-fee 0.0004 \
-p order_size=0.1 \
-v| Flag | Description | Default |
|---|---|---|
-d, --data <PATH> | Prepared data file (.parquet or .bin) | (required) |
--balance <FLOAT> | Initial balance in USD | 10000 |
--leverage <FLOAT> | Leverage multiplier | 1.0 |
--taker-fee <FLOAT> | Taker fee rate | 0.0004 |
--maker-fee <FLOAT> | Maker fee rate | 0.0002 |
--slippage <FLOAT> | Slippage percentage | 0.0001 |
-p, --param <KEY=VALUE> | Strategy parameters (repeatable) | — |
-v, --verbose | Print individual trades | false |
tradectl sweep
Run a parameter sweep.
tradectl sweep \
-d data/prepared.bin \
-r order_size=50:500:50 \
-r threshold=0.5:2.0:0.1 \
--top 20| Flag | Description | Default |
|---|---|---|
-d, --data <PATH> | Prepared data file | (required) |
-r, --range <KEY=MIN:MAX:STEP> | Parameter ranges (repeatable) | (required) |
-p, --param <KEY=VALUE> | Fixed parameters (repeatable) | — |
--balance <FLOAT> | Initial balance | 10000 |
--leverage <FLOAT> | Leverage | 1.0 |
--taker-fee <FLOAT> | Taker fee | 0.0004 |
--maker-fee <FLOAT> | Maker fee | 0.0002 |
--slippage <FLOAT> | Slippage | 0.0001 |
--top <N> | Show top N results | 20 |
--min-trades <N> | Minimum trades to include | 5 |
-o, --output <PATH> | Save results as JSON | — |
tradectl prepare
Prepare raw market data for backtesting.
tradectl prepare \
--ticker-data data/raw/bookTicker.log \
--trade-data data/raw/aggTrades.log \
-o data/prepared.bin| Flag | Description |
|---|---|
--ticker-data <PATH> | bookTicker data file (.log, .csv, .parquet) |
--trade-data <PATH> | aggTrades data file |
--trades-only | Synthesize tickers from trades |
--ticker-bucket-ms <N> | Ticker synthesis bucket (default: 100) |
--buffer-ms <N> | Windowing buffer (default: 20, 0 = off) |
-o, --output <PATH> | Output path (.bin or .parquet) |
tradectl convert
Convert between prepared data formats.
tradectl convert -i data/prepared.parquet -o data/prepared.bin
tradectl convert -i data/prepared.bin -o data/prepared.parquettradectl monitor
Open the monitor dashboard in a browser.
tradectl monitor # Default: http://localhost:9100
tradectl monitor --url http://custom:9100tradectl config validate
Validate a bot config file.
tradectl config validate --config config.jsontradectl strats
List local strategy binaries.
tradectl stratstradectl publish
Register a strategy with your account.
tradectl publish # Register strategy
tradectl publish --binary # Also build and upload binary to marketplacetradectl install <strategy>
Download a strategy from the marketplace.
tradectl install bounce-back-scalpertradectl update
Update the CLI binary to the latest version.
tradectl update