CLI Overview

OpenMM provides a command-line interface for interacting with multiple cryptocurrency exchanges using a unified set of commands.

Installation & Setup

# Build the project first
npm install
npm run build

# Install globally to use 'openmm' command anywhere
npm install -g .

# Now use openmm from anywhere
openmm [command] [options]

Alternative: Development Mode

# Run commands during development (without global install)
npm run cli -- [command] [options]

Alternative: Using npx

Supported Exchanges

Currently supported exchanges:

  • mexc - MEXC Exchange (fully implemented)

  • gateio - Gate.io (fully implemented)

  • bitget - Bitget (fully implemented)

  • kraken - Kraken (fully implemented with WebSocket support)

Cardano Integration

OpenMM includes comprehensive Cardano DEX integration through Iris Protocol:

  • Pool Discovery - Find optimal liquidity pools for Cardano native tokens

  • Price Aggregation - Get liquidity-weighted prices from multiple DEXes

  • Token Management - Easy addition and configuration of new Cardano tokens

📖 For token setup guide, see CARDANO_TOKENS.md

Commands

Main Help


📊 Balance Commands

Get account balance information from exchanges.

Get All Balances

Get Specific Asset Balance

JSON Output

Options:

  • -e, --exchange <exchange> - Exchange to query (required)

  • -a, --asset <asset> - Specific asset to query (optional)

  • --json - Output in JSON format


📋 Order Commands

Manage trading orders on exchanges.

List Open Orders

Get Specific Order

Create New Order

Cancel Order

List Options:

  • -e, --exchange <exchange> - Exchange to query (required)

  • -s, --symbol <symbol> - Filter by trading pair (optional)

  • -l, --limit <limit> - Number of orders to display (default: all)

  • --json - Output in JSON format

Get Options:

  • -e, --exchange <exchange> - Exchange to query (required)

  • -i, --id <orderId> - Order ID (required)

  • -s, --symbol <symbol> - Trading pair symbol (required)

  • --json - Output in JSON format

Create Options:

  • -e, --exchange <exchange> - Exchange to use (required)

  • -s, --symbol <symbol> - Trading pair (required)

  • --side <side> - Order side: buy/sell (required)

  • --type <type> - Order type: market/limit (required)

  • --amount <amount> - Order amount (required)

  • --price <price> - Order price (required for limit orders)

  • --json - Output in JSON format

Cancel Options:

  • -e, --exchange <exchange> - Exchange to use (required)

  • -i, --id <orderId> - Order ID to cancel (required)

  • -s, --symbol <symbol> - Trading pair symbol (required)

  • --json - Output in JSON format


📈 Market Data Commands

Get real-time market data from exchanges.

Ticker Data

Options:

  • -e, --exchange <exchange> - Exchange to query (required)

  • -s, --symbol <symbol> - Trading pair symbol (required)

  • --json - Output in JSON format

Order Book

Options:

  • -e, --exchange <exchange> - Exchange to query (required)

  • -s, --symbol <symbol> - Trading pair symbol (required)

  • -l, --limit <limit> - Number of bid/ask levels (default: 10)

  • --json - Output in JSON format

Recent Trades

Options:

  • -e, --exchange <exchange> - Exchange to query (required)

  • -s, --symbol <symbol> - Trading pair symbol (required)

  • -l, --limit <limit> - Number of trades to display (default: 20)

  • --json - Output in JSON format


🔧 Environment Setup

Required Configuration

Ensure your .env file contains the necessary API credentials:

Symbol Format

  • Use standard format: BTC/USDT, ETH/USDT, INDY/USDT, ADA/EUR, BTC/USD

  • The CLI automatically converts to exchange-specific format

  • Kraken supports both USD/EUR fiat pairs and USDT pairs


🔍 Common Examples

Check Balance

Get Ticker Price

View Order Book

Place Orders

List Open Orders


🏊 Cardano Pool Discovery Commands

Discover and analyze Cardano DEX liquidity pools for native tokens.

Discover Pools for a Token

List Supported Tokens

Get Live Pool Prices

Pool Discovery Options:

  • --limit <number> - Limit number of pools shown (default: 10)

  • --min-liquidity <number> - Filter pools by minimum TVL in dollars

  • --show-all - Show all pools (ignore limit)

Supported Cardano Tokens:

  • NIGHT - Midnight

  • SNEK - Snek Token

  • INDY - Indigo Protocol


📊 Price Comparison Commands

Compare token prices across multiple exchanges (MEXC, Gate.io, Bitget) and Cardano DEX pools.

Compare Prices Across All Sources


📖 Help

Get help for any command:


Last updated