6MM CLI

Use the 6MM command-line interface from terminals, scripts, and AI coding agents.

View as Markdown

6MM CLI is the command-line entrypoint for users, scripts, and AI Agents that can execute shell commands.

Use CLI when the AI environment can run terminal commands directly. This is often the simplest path for coding agents because no separate MCP server is required. The CLI should return stable JSON by default so agents can parse results without relying on terminal formatting.

What the CLI is good for

  • Quick market-data queries from a terminal.
  • Agent-driven analysis in Codex, Claude Code, Gemini CLI, or similar tools.
  • CI or scheduled scripts that need 6MM data.
  • Account-read checks when local credentials are configured.
  • Order preview flows where the agent prepares parameters but does not place an order.

Example commands

$6mm markets
$6mm ticker BTC-USDT-PERP
$6mm orderbook BTC-USDT-PERP --depth 20
$6mm klines BTC-USDT-PERP --interval 1h --limit 100
$6mm account summary
$6mm positions
$6mm orders open
$6mm order preview --symbol BTC-USDT-PERP --side buy --type limit --price 65000 --size 0.01
$6mm order create --symbol BTC-USDT-PERP --side buy --type limit --price 65000 --size 0.01
$6mm order cancel --order-id xxx

Output modes

ModeUse case
JSONDefault for AI Agents, scripts, and automation.
TableHuman-readable terminal review.
RawDebugging and integration tests.
  • Default environment is testnet.
  • Default output is JSON.
  • Trading commands require explicit opt-in.
  • Mainnet order creation requires confirmation.
  • Preview mode is available before create.
  • Errors include stable codes and clear messages.

Agent usage

AI Agents should prefer read-only commands unless the user explicitly asks for preview or trading actions.

Example prompt:

Use the 6MM CLI to fetch BTC-USDT-PERP orderbook depth and return a short liquidity summary.