Algo Commands
Lifecycle commands for WASM trading algos. A deployment is driven by a Sequence.toml at the project root — most commands read config from there and the deployment name defaults to the one in the file.
sequence --sandbox <command> routes any command through paper-trading infrastructure (seq_test_ key, isolated edges). Sandbox uses live market data and never places real orders.
sequence init <name>
Scaffold a new algo project.
sequence init my-algoCreates a directory with Cargo.toml, src/lib.rs, .cargo/config.toml, and a starter Sequence.toml pre-configured for the WASM target. Project names accept alphanumerics, hyphens, and underscores.
If no API key is configured on the machine, init prompts for one via sequence login.
sequence build
Compile your algo to WASM. Run from inside your project directory.
sequence buildRuns cargo build --target wasm32-unknown-unknown --release. Installs the WASM target automatically if missing, then reports the .wasm path and size.
Typical algo binaries are 10–50 KB. If yours is much larger, look for dependencies pulling in std allocators or unused crates.
sequence deploy
Upload and register the compiled WASM. All config comes from Sequence.toml in the current directory — venue, symbols, labels, risk limits, and per-instance mesh topology all live there.
sequence deploy # Build + deploy based on Sequence.toml
sequence deploy --skip-build # Deploy an already-built .wasm
sequence --sandbox deploy # Paper-trade deploy| Flag | Description |
|---|---|
--skip-build | Skip WASM build — use the existing .wasm artifact |
The deployment name, target venues, labels, and risk are all declared in Sequence.toml. See Strategies & Mesh for the multi-instance layout.
Deployments start in stopped state by default. This lets WebSocket subscriptions warm up on the target edges before your algo sees its first book update.
sequence start [name]
Start a stopped deployment.
sequence start # Uses name from Sequence.toml
sequence start my-mm # Explicit deployment namesequence stop [name]
Pause a running deployment. All state is preserved — resume with sequence start.
sequence stop
sequence stop my-mmsequence undeploy [name]
Remove a deployment entirely. Stops the instances and deletes registration.
sequence undeploy
sequence undeploy my-mmsequence status [name]
Show current deployment state and per-edge health.
sequence status
sequence status my-mmReports whether each instance is live, its last heartbeat, order counts, and any registration errors.
sequence logs [name]
Stream algo log output.
sequence logs # Last 100 lines for the Sequence.toml deployment
sequence logs -f # Tail live
sequence logs my-mm --follow # Tail a different deployment| Flag | Description |
|---|---|
-f, --follow | Follow logs in real time |
Log levels are color-coded: INFO, WARN, ERROR, DEBUG.
sequence watch [name]
Live TUI showing orders, fills, per-edge latency, and mesh message flow in real time.
sequence watch
sequence watch my-mmsequence mesh [name]
Print the mesh topology — which labels are deployed where, and measured inter-instance latency for each (from, to) pair.
sequence meshsequence trace <order_id>
Per-order lifecycle trace with nanosecond timestamps across submission → routing → venue ack → fill.
sequence trace P-8f3a1b2cUseful for debugging routing decisions and measuring tail latency on individual orders.
sequence tca [--symbol <pair>]
Transaction cost analysis for a deployment — slippage, fees, per-venue routing breakdown.
sequence tca # Current deployment
sequence tca my-mm # Named deployment
sequence tca --symbol BTC-USD # Filter to a single pairsequence intel <symbol>
Market-structure intelligence for a symbol: venue coverage, measured slippage curves, gas-adjusted DEX costs, and current SOR routing preference.
sequence intel BTC-USDsequence preflight
Pre-deploy readiness checklist. Verifies connected venues, available capital, risk limits, and deployment-name conflicts before you hit deploy.
sequence preflightsequence login
Store your Sequence API key locally.
sequence login # Prompts for live key
sequence login --sandbox # Prompts for a seq_test_ keysequence update
Self-update the CLI to the latest release. Downloads from GitHub, verifies SHA-256 checksum, and atomically replaces the binary.
sequence updateFull Workflow
# 1. Scaffold
sequence init my-mm
cd my-mm
# 2. Edit src/lib.rs with your strategy
# Edit Sequence.toml to pick venue(s), symbols, and labels
# 3. Build
sequence build
# 4. Sanity check
sequence preflight
# 5. Deploy (starts stopped)
sequence deploy
# 6. Start
sequence start
# 7. Monitor
sequence logs -f # or: sequence watch
# 8. Stop and tear down
sequence stop
sequence undeployPaper trading
sequence login --sandbox
sequence --sandbox deploy
sequence --sandbox start
sequence --sandbox logs -fSandbox uses seq_test_ keys and routes through isolated sandbox infrastructure. Live market data, no real orders.