Market LabDocs

Installation

Install Market Lab and configure provider credentials securely.

Installation

Market Lab is distributed as a downloadable CLI binary.

Requirements

  • curl
  • tar
  • an MMT API key only when using the MMT provider
  • a BULK account and authorized agent only when using account or execution commands

Supported Platforms

Current binary releases are published for:

  • macOS arm64
  • Linux x64
  • Linux arm64

Install

curl -fsSL https://marketlab.sh/install.sh | sh

Install a specific version:

curl -fsSL https://marketlab.sh/install.sh | sh -s -- v0.0.4

MMT Market Data

Get an API key from Market Monkey Terminal

mlab auth set mmt

Market Lab stores the key in the operating system keychain. Use MMT_API_KEY only for CI or other non-interactive environments.

BULK Market Catalog

Inspect the BULK market catalog without credentials or a network request:

mlab markets --exchange bulk
mlab markets --exchange bulk --symbol BTC/USDT

Public BULK market data also works without credentials:

mlab health --exchange bulk
mlab source orderbook --exchange bulk --symbol BTC/USDT --depth 20

BULK Agent Wallet

Market Lab can create and authorize a BULK agent wallet:

mlab auth set bulk

The command generates the agent locally, stores it in the operating system keychain, and asks for the main wallet private key through a hidden prompt to authorize the agent. Market Lab does not store the main wallet private key.

Check both credential integrations:

mlab auth status

Start with a dry run. It validates and prints a normalized order plan without signing, submitting, or starting mlabd:

mlab trade long BTC/USDT --margin 10 --dry-run

See Execution before placing a live order. The guide covers confirmation, validation, account state, cancellation, closing, daemon behavior, and lifecycle events.

Verify Install

mlab --version
mlab --help
mlab daemon status

A fresh install should report mlabd: stopped. The daemon starts automatically when a live execution command or deployed script job needs it.

Quickstart in 60 Seconds

Configure your MMT API key:

mlab auth set mmt

Check connectivity:

mlab health --provider mmt

Inspect the orderbook:

mlab source orderbook \
  --provider mmt \
  --exchange bybitf \
  --symbol BTC/USDT \
  --depth 20

Estimate slippage:

mlab study slippage \
  --provider mmt \
  --exchange bybitf \
  --symbol BTC/USDT \
  --side buy \
  --notional 100000

Preview the built-in TWAP execution strategy:

mlab strategy run twap BTC/USDT \
  --exchange bulk \
  --side buy \
  --margin 100 \
  --duration 300 \
  --interval 60 \
  --dry-run

Integration Support

Market data currently comes from:

MMT provides multi-venue data and requires an API key. BULK provides public native market data without credentials and is the current execution venue. Sources and scripts support BULK where its native data contract is available. Built-in studies currently use MMT; the native TWAP strategy executes on BULK.

On this page