CLI Overview
OpenMM provides a command-line interface for interacting with multiple cryptocurrency exchanges using a unified set of commands.
Installation & Setup
Recommended: Global Installation
# 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 Cardano DEX integration through multiple providers:
Pool Discovery - Find direct ADA liquidity pools through Minswap and SundaeSwap
Price Aggregation - Get resilient liquidity-weighted prices from Minswap and SundaeSwap
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/USDThe 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