Skip to content

CLI Commands

tradectl login

Authenticate with the platform using an API key.

bash
echo "st_live_<your-key>" | tradectl login

Exchanges 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.

bash
tradectl init my-strategy

Creates 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.

bash
tradectl auth set binance     # Set credentials for an exchange
tradectl auth list            # List configured exchanges
tradectl auth remove binance  # Remove exchange credentials

Supported exchanges: binance, bybit, hyperliquid.

tradectl build

Build the strategy binary.

bash
tradectl build

Compiles the strategy in release mode as a dynamic library (cdylib).

tradectl run

Run a strategy (paper or live).

bash
tradectl run --config config.json
tradectl run --config config.json --daemon    # Background mode
tradectl run --config config.json --dry-run   # Validate only
FlagDescription
--config <PATH>Path to config file
--daemonRun in background as detached process
--dry-runValidate config and load strategy without starting

tradectl stop

Stop a running bot.

bash
tradectl stop --config config.json   # Stop specific bot
tradectl stop --all                  # Stop all bots

tradectl status

Show status of running bots.

bash
tradectl status                      # All bots
tradectl status --config config.json # Specific bot

tradectl logs

View bot logs.

bash
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
FlagDescriptionDefault
--config <PATH>Filter to specific botall
-f, --followFollow log output (like tail -f)false
-n, --lines <N>Number of lines to show50

tradectl backtest

Run a local backtest.

bash
tradectl backtest \
  -d data/prepared.bin \
  --leverage 5 \
  --taker-fee 0.0004 \
  -p order_size=0.1 \
  -v
FlagDescriptionDefault
-d, --data <PATH>Prepared data file (.parquet or .bin)(required)
--balance <FLOAT>Initial balance in USD10000
--leverage <FLOAT>Leverage multiplier1.0
--taker-fee <FLOAT>Taker fee rate0.0004
--maker-fee <FLOAT>Maker fee rate0.0002
--slippage <FLOAT>Slippage percentage0.0001
-p, --param <KEY=VALUE>Strategy parameters (repeatable)
-v, --verbosePrint individual tradesfalse

tradectl sweep

Run a parameter sweep.

bash
tradectl sweep \
  -d data/prepared.bin \
  -r order_size=50:500:50 \
  -r threshold=0.5:2.0:0.1 \
  --top 20
FlagDescriptionDefault
-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 balance10000
--leverage <FLOAT>Leverage1.0
--taker-fee <FLOAT>Taker fee0.0004
--maker-fee <FLOAT>Maker fee0.0002
--slippage <FLOAT>Slippage0.0001
--top <N>Show top N results20
--min-trades <N>Minimum trades to include5
-o, --output <PATH>Save results as JSON

tradectl prepare

Prepare raw market data for backtesting.

bash
tradectl prepare \
  --ticker-data data/raw/bookTicker.log \
  --trade-data data/raw/aggTrades.log \
  -o data/prepared.bin
FlagDescription
--ticker-data <PATH>bookTicker data file (.log, .csv, .parquet)
--trade-data <PATH>aggTrades data file
--trades-onlySynthesize 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.

bash
tradectl convert -i data/prepared.parquet -o data/prepared.bin
tradectl convert -i data/prepared.bin -o data/prepared.parquet

tradectl monitor

Open the monitor dashboard in a browser.

bash
tradectl monitor                          # Default: http://localhost:9100
tradectl monitor --url http://custom:9100

tradectl config validate

Validate a bot config file.

bash
tradectl config validate --config config.json

tradectl strats

List local strategy binaries.

bash
tradectl strats

tradectl publish

Register a strategy with your account.

bash
tradectl publish              # Register strategy
tradectl publish --binary     # Also build and upload binary to marketplace

tradectl install <strategy>

Download a strategy from the marketplace.

bash
tradectl install bounce-back-scalper

tradectl update

Update the CLI binary to the latest version.

bash
tradectl update

tradectl — Automate Crypto Trading