Source data
Access live and historical candles, orderbooks, volume delta, open interest, and volume profiles through one provider interface.
$ mlab source orderbook ...Market Lab is a programmable runtime for market research, backtesting, and live analysis. Inspect market history, analyze order flow, and run custom scripts from the terminal.
$ curl -fsSL https://marketlab.sh/install.sh | shmlab script backtest ./btc-momentum.js \--provider mmt \--exchange hyperliquid \--symbol BTC/USDT \--from 1780307559000 --to 1780523645331 \--source candles:timeframe=60 \--source orderbook:timeframe=60 \--source orderbook:depth=100 \--param candles:fast=20 --param candles:slow=50 \--param candles:notional=1000 \--param orderbook:max_spread_bps=3 --leverage 5~/.market-lab/runs/01J4BTC9Source, study, strategy, and script share the same market model, provider interface, and structured output contracts.
Access live and historical candles, orderbooks, volume delta, open interest, and volume profiles through one provider interface.
$ mlab source orderbook ...Compute spread, depth, imbalance, slippage, VAMP, CVD, EMA, and SMA on normalized market data.
$ mlab study slippage ...Run built-in strategy logic live or over a historical range and inspect structured performance summaries.
$ mlab strategy backtest sma-crossover ...Run custom JavaScript against one or more market sources, in live or backtest mode, with source-scoped inputs.
$ mlab script backtest ./strategy.js ...Provider access, validation, historical inspection, studies, scripts, and output envelopes live behind one command surface. Your logic stays focused on the market.
Binance spot order books and trades.
candlesorderbookvdoivolumesSearch the symbols indexed across every supported MMT venue. Filter spot, derivatives, and decentralized markets without leaving the page.
Each command advances the same workflow instead of starting a separate project, notebook, or integration.
mlab sourceConnect market data
mlab studyMeasure the market
mlab strategy backtestTest built-in logic
mlab script backtestTest custom logic
mlab script runRun custom logic live
Market Lab owns data loading, source normalization, parameter validation, backtest accounting, and structured output. You own the idea.
01 export const script = {
02 name: "ema-cross",
03 sources: ["candles"],
04 lookback: 100
05 }
06 export function onData(ctx, input) {
07 const candles = input.candles.candles
08 const fast = ctx.study.ema(candles, {
09 field: "c", window: 20
10 })
11 const slow = ctx.study.ema(candles, {
12 field: "c", window: 50
13 })
14 if (fast.previous <= slow.previous &&
15 fast.latest > slow.latest) {
16 return {
17 signal: { triggered: true, side: "buy" },
18 intent: { action: "open", side: "long" }
19 }
20 }
21 }A compact surface for the recurring work behind quantitative research and market-structure analysis.
Market Lab is infrastructure for technical market participants, not another dashboard to watch.
Build, test, and inspect strategy logic without moving between notebooks, scripts, and dashboards.
Measure spread, depth, imbalance, VAMP, and slippage directly against the orderbook.
Give agents compact JSON, deterministic commands, and a constrained runtime they can operate programmatically.
Market Lab is public and licensed under AGPL-3.0. The current runtime covers market data, studies, JavaScript scripting, live evaluation, and backtesting. Exchange execution adapters are the next boundary, and are not presented as shipping today.
Install Market Lab and go from market data to a reproducible backtest in one runtime.