Command Line Interface
Use OpenMM directly from your terminal for scripts and automation.
📖 View full CLI reference on GitHubInstallation
Install OpenMM globally:
npm install -g @qbt-labs/openmmOr use npx to run without installing: npx @qbt-labs/openmm <command>
Commands
openmm balance
Get account balances from an exchange
Usage:
openmm balance --exchange mexc --asset BTCOptions:
| --exchange | Exchange id (mexc, gateio, kraken, bitget) |
| --asset | Filter by specific asset (optional) |
| --json | Output in JSON format |
openmm ticker
Get the current price for a trading pair
Usage:
openmm ticker --exchange mexc --symbol BTC/USDTOptions:
| --exchange | Exchange id (mexc, gateio, kraken, bitget) |
| --symbol | Trading pair (e.g., BTC/USDT) |
openmm orderbook
Get the order book for a trading pair
Usage:
openmm orderbook --exchange mexc --symbol BTC/USDT --limit 10Options:
| --exchange | Exchange id |
| --symbol | Trading pair |
| --limit | Number of levels (default: 10) |
openmm trades
Get recent trades for a trading pair
Usage:
openmm trades --exchange mexc --symbol BTC/USDT --limit 50Options:
| --exchange | Exchange id |
| --symbol | Trading pair |
| --limit | Number of trades (default: 50) |
openmm cardano-price
Get Cardano token price from DEX aggregation
Usage:
openmm cardano-price --symbol SNEKOptions:
| --symbol | Cardano token symbol (e.g., SNEK, INDY, NIGHT) |
openmm orders list
List open orders on an exchange
Usage:
openmm orders list --exchange mexc --symbol BTC/USDTOptions:
| --exchange | Exchange id |
| --symbol | Filter by trading pair (optional) |
| --limit | Number of orders to display |
openmm orders create
Create a new order
Usage:
openmm orders create --exchange mexc --symbol BTC/USDT --side buy --type limit --amount 0.001 --price 50000Options:
| --exchange | Exchange id |
| --symbol | Trading pair |
| --side | Order side: buy or sell |
| --type | Order type: market or limit |
| --amount | Order amount |
| --price | Order price (required for limit orders) |
openmm orders cancel
Cancel an existing order
Usage:
openmm orders cancel --exchange mexc --id ORDER_ID --symbol BTC/USDTOptions:
| --exchange | Exchange id |
| --id | Order ID to cancel |
| --symbol | Trading pair symbol |
openmm pool-discovery
Discover Cardano DEX liquidity pools for a token
Usage:
openmm pool-discovery discover SNEK --limit 5Options:
| --limit | Limit number of pools shown (default: 10) |
| --min-liquidity | Filter by minimum TVL in dollars |
| --show-all | Show all pools (ignore limit) |
Environment Variables
Set exchange credentials as environment variables:
export MEXC_API_KEY="your-api-key"
export MEXC_SECRET="your-secret"
export GATEIO_API_KEY="your-api-key"
export GATEIO_SECRET="your-secret"
export KRAKEN_API_KEY="your-api-key"
export KRAKEN_SECRET="your-secret"
export BITGET_API_KEY="your-api-key"
export BITGET_SECRET="your-secret"💡 API keys are only required for trading operations. Market data commands work without authentication.
