Algorithms
Deploy compiled WASM trading algorithms to Sequence venue edges. The strategy runs colocated with the OMS — there's no network hop from your on_book() callback to order submission. One running WASM per symbol per client is the user-facing surface (/v1/algos/*); the underlying primitive is a multi-symbol deployment (/v1/deployments/*).
This guide is the SDK side of algo lifecycle (deploy / start / stop / mesh / logs / metrics). For writing the WASM code itself, see Algo SDK.
Deploy
let bytes = std::fs::read("./target/wasm32-unknown-unknown/release/my_algo.wasm")?;
let dep = seq.deploy_algo("my-mm", bytes, vec!["ETH-USDC".to_string()]).await?;
println!("deployment_id={} pushed_to={}/{}",
dep.deployment_id, dep.pushed_to, dep.capable_edges);Returns Deployment { deployment_id, name, symbols, size_bytes, status, pushed_to, capable_edges, edges: Vec<DeploymentEdge> }. pushed_to < capable_edges means at least one edge rejected the push — inspect dep.edges[*].status.
Lifecycle (deployment-keyed)
seq.algo_status ("dep_…").await?; // full state
seq.algo_start ("dep_…").await?;
seq.algo_stop ("dep_…").await?; // does NOT cancel resting orders
seq.algo_undeploy ("dep_…").await?; // stop + delete
seq.algo_logs ("dep_…", 200).await?;
seq.algo_mesh ("dep_…").await?; // mesh topology
seq.algo_metrics ("dep_…").await?;algo_stop does not cancel the algo's resting orders. The strategy keeps state but stops receiving market data and placing new orders. Handle resting-order cleanup in your on_stop callback or issue per-order cancels via cancel_all_on_venue / cancel.
Lifecycle (symbol-keyed legacy)
/v1/algos/* is the user-facing surface for algos (one running WASM per symbol per client). It still works, but new integrations should use the deployment-keyed surface above.
seq.algos().await?; // GET /v1/algos
seq.algos_per_edge().await?; // GET /v1/algos?detail=edge
seq.algo("ETH-USD").await?;
seq.algo_start_by_symbol("ETH-USD").await?;
seq.algo_stop_by_symbol ("ETH-USD").await?;
seq.algo_logs_by_symbol ("ETH-USD").await?;
seq.algo_stats ("ETH-USD").await?;Mesh topology
For multi-venue mesh algos (export_algo! with on_message), inspect the live mesh — which instances are running where, and the per-link latency stats:
let mesh = seq.algo_mesh("dep_…").await?; // serde_json::Value todayReturns {deployment_id, mesh_group, instances: [{mesh_id, edge_id, label, venue}], links: [...]}. When the deployment belongs to a mesh_group, the response covers every instance in the group, not just this deployment.
Hosted strategies
For hosted Python strategies (long-running daemon containers, not WASM), the lifecycle is parallel — strategy create flows through the CLI's vendored-SDK packaging path (sequence strategy push); read/start/stop/logs are SDK-native:
seq.strategies().await?;
seq.strategy("strat_abc").await?;
seq.strategy_start("strat_abc").await?;
seq.strategy_stop ("strat_abc").await?;
seq.strategy_logs ("strat_abc").await?;
seq.strategy_delete("strat_abc").await?;For the full hosted-strategy walkthrough, see Hosted Strategies.