Algorithmic trading and market making. From the terminal.

Research, backtest, and execute across centralized and onchain markets from one local runtime.

Read docs
$ curl -fsSL https://marketlab.sh/install.sh | bash
~/.market-lab/bots/bot_01J4MM82marketlab
$mlab bot run grid BTC \--venue bulkf --margin 100 --leverage 10 \--duration 3600 --levels 5 --step-bps 6 \--stop-loss-pct 5
Classic paired grid runningBUY L1 filled
Jobbot_01J4MM82
ModeGRID
VenueBULK
Levels5 / SIDE
Bidspricesize
L165,891.40.00151
L265,851.90.00151
L365,812.30.00151
L465,772.70.00151
L565,733.10.00151
Askspricesize
L165,970.60.00151
L266,010.10.00151
L366,049.70.00151
L466,089.30.00151
L566,128.90.00151
Inventory+0.00151 BTC
Anchor$65,931
Fixed step6 BPS
Net PnL+$0.12
paired orderSELL L1 @ 65,931.0
Setup with your coding agent

Tell your agent to set up Market Lab.

Copy the prompt. Your coding agent reads the docs, installs Market Lab, and verifies the runtime.

01 Copy02 Paste03 Review
marketlab-setup.md
# Set Up Market Lab

Install or upgrade Market Lab on this machine and verify the setup.

Official documentation:

https://docs.marketlab.sh/

Read the Installation and Daemon pages before acting. Use the docs and the installed CLI's `--help` output as the source of truth.

1. Inspect the operating system, architecture, `PATH`, and any existing `mlab` installation.
2. Ask whether `mlabd` should use the **Native** or **Docker** backend. Do not choose or change the backend silently.
3. Follow the documented install or upgrade flow.
4. Verify:

```bash
mlab --version
mlab daemon backend
mlab daemon status
```

Ask before configuring market data, authentication, execution, SSH transport, or Python.

Never ask the user to paste a private key or API key into chat. Keep authentication inside Market Lab's hidden terminal prompts. Never place a live order during setup; use `--dry-run` when a check requires an execution plan.

Finish with the installed version, selected backend, daemon status, any optional setup completed, and one safe next command.
01 / OPERATE

Built to trade.

Run a native algorithm, deploy a market maker, or bring your own code.

Work an order

Execution algorithms

01

Volume-paced execution.

Volume-pacedMaker-firstParticipation cap
$ mlab strategy run vwap BTC \
  --venue bulkf --side buy --margin 100 --duration 3600 \
  --volume-sources binancef@mmt,okxf@mmt,bulkf --dry-run
Quote liquidity

Market makers

02

Fixed paired grid.

Fixed pricesPaired cellsStop loss
$ mlab bot run grid BTC \
  --venue bulkf --margin 100 --leverage 10 \
  --duration 3600 --levels 5 --step-bps 6 \
  --stop-loss-pct 5 --dry-run
03Research

Explore data in JupyterLab.

$ mlab notebook
04Scripting

Backtest your own strategy.

$ mlab script backtest strategy.py \
  --from 2026-08-01 --to 2026-08-20
05Job control

Run and supervise detached jobs.

$ mlab bot status <JOB_ID>
mlab bot logs <JOB_ID> --follow
mlab bot stop <JOB_ID>
02 / ARCHITECTURE

Data in. Orders out.

One local runtime connects market data, strategy logic, and execution.

PROVIDERS / VENUESSelect a provider
MMT venues20+ venues
binanceCEX / Spot

Binance spot order books and trades.

SOURCE LAYERcandlestradesorderbookvdvolumes
MARKET LABTrading terminal
LOCAL
DataBacktestsStrategiesBotsScriptsExecution
OPERATOR SURFACETerminal / JSON / JSONL
EXECUTION LAYERmlabd / Native or Dockerlocal
EXECUTIONThree providers
BULK
Execution provider--venue bulkf

Testnet

Hyperliquid
Execution providerhyperliquid / hyperliquidf

Direct

HyperLink
Execution providerhyperlink / hyperlinkf

Mainnet

03 / MARKET CATALOG

Find the exact symbol.

Search the bundled catalog by provider, venue, or symbol.

Loading catalog
ProviderProvider symbolVenueMarketMarket Lab input
Loading local market catalog...
04 / BOT WORKFLOW

One job. Four clear states.

Dry-run first. Then deploy, observe, and stop.

marketlab01 / 04
$ mlab bot run grid BTC \
  --venue bulkf --margin 100 --leverage 10 \
  --duration 3600 --levels 5 --step-bps 6 \
  --stop-loss-pct 5 --dry-run
RESULT-levels per side 5-fixed step 6 bps-initial cells 10 equalokorders submitted 0
05 / EXTEND

Write the strategy in Python or JavaScript.

Use your Python environment, or run lightweight JavaScript in QuickJS.

Research in JupyterLab
Backtest and run plain Python
Embed lightweight JavaScript
Explore scripting
Python V2
01 from statistics import fmean

02 SOURCE = "btc@candles@hyperliquidf:timeframe=60"

03 script = {
04   "name": "mean-cross",
05   "version": "2",
06   "lookback": 30,
07 }

08 def on_data(ctx, history):
09   rows = history.source(SOURCE)
10   if len(rows) < 20: return
11   fast = fmean(row["c"] for row in rows[-5:])
12   slow = fmean(row["c"] for row in rows[-20:])

13   if fast > slow:
14     ctx.trade({"exchange": "hyperliquidf", "symbol": "BTC", ...})
Market Lab on GitHub
View repository

Run the next trading job from your terminal.