OpenMM provides a command-line interface for interacting with multiple cryptocurrency exchanges using a unified set of commands.
# 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]# Run commands during development (without global install)
npm run cli -- [command] [options]# Run without global installation (requires build first)
npx openmm [command] [options]Currently supported exchanges:
- mexc - MEXC Exchange (fully implemented)
- gateio - Gate.io (fully implemented)
- bitget - Bitget (fully implemented)
- kraken - Kraken (fully implemented with WebSocket support)
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
openmm --helpGet account balance information from exchanges.
# MEXC Example
openmm balance --exchange mexc
# Gate.io Example
openmm balance --exchange gateio
# Bitget Example
openmm balance --exchange bitget
# Kraken Example
openmm balance --exchange kraken# MEXC Examples
openmm balance --exchange mexc --asset BTC
openmm balance --exchange mexc --asset USDT
# Gate.io Examples
openmm balance --exchange gateio --asset BTC
openmm balance --exchange gateio --asset USDT
# Bitget Examples
openmm balance --exchange bitget --asset BTC
openmm balance --exchange bitget --asset USDT
# Kraken Examples
openmm balance --exchange kraken --asset BTC
openmm balance --exchange kraken --asset EUR# MEXC Example
openmm balance --exchange mexc --json
# Bitget Example
openmm balance --exchange bitget --json
# Kraken Example
openmm balance --exchange kraken --jsonOptions:
-e, --exchange <exchange>- Exchange to query (required)-a, --asset <asset>- Specific asset to query (optional)--json- Output in JSON format
Manage trading orders on exchanges.
# MEXC Examples
openmm orders list --exchange mexc
openmm orders list --exchange mexc --limit 5
openmm orders list --exchange mexc --symbol BTC/USDT
# Gate.io Examples
openmm orders list --exchange gateio
openmm orders list --exchange gateio --limit 5
openmm orders list --exchange gateio --symbol BTC/USDT
# Bitget Examples
openmm orders list --exchange bitget
openmm orders list --exchange bitget --limit 5
openmm orders list --exchange bitget --symbol SNEK/USDT
# Kraken Examples
openmm orders list --exchange kraken
openmm orders list --exchange kraken --limit 5
openmm orders list --exchange kraken --symbol ADA/EUR# MEXC Example
openmm orders get --exchange mexc --id 123456 --symbol BTC/USDT
# Gate.io Example
openmm orders get --exchange gateio --id 123456 --symbol BTC/USDT
# Bitget Example
openmm orders get --exchange bitget --id 1385288398060044291 --symbol SNEK/USDT
# Kraken Example
openmm orders get --exchange kraken --id OQN3UE-LRH6U-MPLZ5I --symbol ADA/EUR# MEXC Examples
openmm orders create --exchange mexc --symbol BTC/USDT --side buy --type limit --amount 0.001 --price 50000
openmm orders create --exchange mexc --symbol BTC/USDT --side sell --type market --amount 0.001
# Gate.io Examples
openmm orders create --exchange gateio --symbol BTC/USDT --side buy --type limit --amount 0.001 --price 50000
openmm orders create --exchange gateio --symbol BTC/USDT --side sell --type market --amount 0.001
# Bitget Examples
openmm orders create --exchange bitget --symbol SNEK/USDT --side buy --type limit --amount 10000 --price 0.00001
openmm orders create --exchange bitget --symbol SNEK/USDT --side sell --type market --amount 5000
# Kraken Examples
openmm orders create --exchange kraken --symbol ADA/EUR --side buy --type limit --amount 50 --price 0.45
openmm orders create --exchange kraken --symbol BTC/USD --side sell --type market --amount 0.001# MEXC Example
openmm orders cancel --exchange mexc --id C02__626091255599874048060 --symbol INDY/USDT
# Gate.io Example
openmm orders cancel --exchange gateio --id 123456 --symbol BTC/USDT
# Bitget Example
openmm orders cancel --exchange bitget --id 1385288398060044291 --symbol SNEK/USDT
# Kraken Example
openmm orders cancel --exchange kraken --id OQN3UE-LRH6U-MPLZ5I --symbol ADA/EURList 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
Get real-time market data from exchanges.
# MEXC Examples
openmm ticker --exchange mexc --symbol BTC/USDT
openmm ticker --exchange mexc --symbol ETH/USDT --json
# Gate.io Examples
openmm ticker --exchange gateio --symbol BTC/USDT
openmm ticker --exchange gateio --symbol ETH/USDT --json
# Bitget Examples
openmm ticker --exchange bitget --symbol SNEK/USDT
openmm ticker --exchange bitget --symbol BTC/USDT --json
# Kraken Examples
openmm ticker --exchange kraken --symbol ADA/EUR
openmm ticker --exchange kraken --symbol BTC/USD --jsonOptions:
-e, --exchange <exchange>- Exchange to query (required)-s, --symbol <symbol>- Trading pair symbol (required)--json- Output in JSON format
# MEXC Examples
openmm orderbook --exchange mexc --symbol BTC/USDT
openmm orderbook --exchange mexc --symbol BTC/USDT --limit 5
# Gate.io Examples
openmm orderbook --exchange gateio --symbol BTC/USDT
openmm orderbook --exchange gateio --symbol BTC/USDT --limit 5
# Bitget Examples
openmm orderbook --exchange bitget --symbol SNEK/USDT
openmm book --exchange bitget --symbol BTC/USDT --json
# Kraken Examples
openmm orderbook --exchange kraken --symbol ADA/EUR
openmm orderbook --exchange kraken --symbol ETH/USD --limit 5 --jsonOptions:
-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
# MEXC Examples
openmm trades --exchange mexc --symbol BTC/USDT
openmm trades --exchange mexc --symbol BTC/USDT --limit 50
openmm trades --exchange mexc --symbol ETH/USDT --json
# Gate.io Examples
openmm trades --exchange gateio --symbol BTC/USDT
openmm trades --exchange gateio --symbol BTC/USDT --limit 50
openmm trades --exchange gateio --symbol ETH/USDT --json
# Bitget Examples
openmm trades --exchange bitget --symbol SNEK/USDT
openmm trades --exchange bitget --symbol BTC/USDT --limit 50
openmm trades --exchange bitget --symbol SNEK/USDT --json
# Kraken Examples
openmm trades --exchange kraken --symbol ADA/EUR
openmm trades --exchange kraken --symbol BTC/USD --limit 50
openmm trades --exchange kraken --symbol ETH/EUR --jsonOptions:
-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
Ensure your .env file contains the necessary API credentials:
# MEXC Configuration
MEXC_API_KEY=your_mexc_api_key
MEXC_SECRET=your_mexc_secret_key
# Gate.io Configuration
GATEIO_API_KEY=your_gateio_api_key
GATEIO_SECRET=your_gateio_secret_key
# Bitget Configuration
BITGET_API_KEY=your_bitget_api_key
BITGET_SECRET=your_bitget_secret_key
BITGET_PASSPHRASE=your_bitget_passphrase # Set when creating API key - API TOKEN
# Kraken Configuration
KRAKEN_API_KEY=your_kraken_api_key
KRAKEN_SECRET=your_kraken_secret_key
- 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
# MEXC - Check BTC Balance
openmm balance --exchange mexc --asset BTC
# Gate.io - Check BTC Balance
openmm balance --exchange gateio --asset BTC
# Bitget - Check USDT Balance
openmm balance --exchange bitget --asset USDT
# Kraken - Check ADA Balance
openmm balance --exchange kraken --asset ADA# MEXC - Get ETH/USDT Price
openmm ticker --exchange mexc --symbol ETH/USDT
# Gate.io - Get BTC/USDT Price
openmm ticker --exchange gateio --symbol BTC/USDT
# Bitget - Get SNEK/USDT Price
openmm ticker --exchange bitget --symbol SNEK/USDT
# Kraken - Get ADA/EUR Price
openmm ticker --exchange kraken --symbol ADA/EUR# MEXC - BTC/USDT Order Book
openmm orderbook --exchange mexc --symbol BTC/USDT --limit 5
# Gate.io - BTC/USDT Order Book
openmm orderbook --exchange gateio --symbol BTC/USDT --limit 5
# Bitget - SNEK/USDT Order Book
openmm orderbook --exchange bitget --symbol SNEK/USDT --limit 10
# Kraken - ADA/EUR Order Book
openmm orderbook --exchange kraken --symbol ADA/EUR --limit 5# MEXC - Limit Buy Order
openmm orders create --exchange mexc --symbol BTC/USDT --side buy --type limit --amount 0.001 --price 45000
# Gate.io - Limit Buy Order
openmm orders create --exchange gateio --symbol BTC/USDT --side buy --type limit --amount 0.001 --price 45000
# Bitget - Limit Buy Order
openmm orders create --exchange bitget --symbol SNEK/USDT --side buy --type limit --amount 10000 --price 0.00001
# Kraken - Limit Buy Order
openmm orders create --exchange kraken --symbol ADA/EUR --side buy --type limit --amount 50 --price 0.45# MEXC - All Open Orders
openmm orders list --exchange mexc
# Gate.io - All Open Orders
openmm orders list --exchange gateio
# Bitget - Open Orders for SNEK/USDT
openmm orders list --exchange bitget --symbol SNEK/USDT
# Kraken - Open Orders for ADA/EUR
openmm orders list --exchange kraken --symbol ADA/EURDiscover and analyze Cardano DEX liquidity pools for native tokens.
# Discover pools for NIGHT token
openmm pool-discovery discover NIGHT
# Discover top 5 pools for SNEK token
openmm pool-discovery discover SNEK --limit 5
# Find pools with minimum $50K liquidity for INDY
openmm pool-discovery discover INDY --min-liquidity 50000
# Show all available pools for a token
openmm pool-discovery discover INDY --show-all# See all supported Cardano tokens
openmm pool-discovery supportedopenmm pool-discovery prices NIGHTPool 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
Compare token prices across multiple exchanges (MEXC, Gate.io, Bitget) and Cardano DEX pools.
# Compare SNEK across DEX and CEX
openmm price-comparison --symbol SNEK
# Compare INDY prices
openmm price-comparison --symbol INDYGet help for any command:
openmm --help # Main help
openmm balance --help # Balance command help
openmm orders --help # Orders command help
openmm orders create --help # Order creation help
openmm ticker --help # Ticker command help
openmm orderbook --help # Order book command help
openmm trades --help # Trades command help
openmm pool-discovery --help # Pool discovery help
openmm price-comparison --help # Price comparison help