MarketLab Docs

Getting Started

Start using the current Market Lab CLI and understand what exists today.

Local Development

The CLI currently lives in the Rust repository.

Basic flow:

mlab --help

If you use the MMT provider, store an API key:

mlab auth set mmt

First Useful Commands

Current source example:

mlab source orderbook --provider mmt --exchange bybitf --symbol BTC/USDT --depth 100 --output terminal

Current study example:

mlab study slippage --provider mmt --exchange bybitf --symbol BTC/USDT --side buy --notional 100000 --depth 100 --output json

Current strategy example:

mlab strategy backtest sma-crossover --provider mmt --exchange bybitf --symbol BTC/USDT --timeframe 60 --from 1779660000000 --to 1779705600000 --fast 20 --slow 50 --output terminal

Current script backtest example:

mlab script backtest ./scripts/sma-cross.js --provider mmt --exchange bybitf --symbol BTC/USDT --from 1704067200000 --to 1704667200000 --source candles:timeframe=60 --param candles:fast=20 --param candles:slow=50 --param candles:notional=1000 --leverage 5 --output json

View script runtime reports:

mlab script runs list
mlab script runs show <run-id>

Milliseconds First

Market Lab uses milliseconds at the app boundary.

That means values like:

  • --from
  • --to
  • ts_ms

should be treated as millisecond-oriented when using the CLI.

Providers may use other units internally. Market Lab handles that conversion.

On this page