Skip to main content

What is the Decibel CLI?

The Decibel CLI (@decibeltrade/cli) is a command-line interface for trading on Decibel DEX. It provides direct terminal access to:
  • Perpetuals trading - Place and cancel orders (limit, market, stop, TWAP), manage positions, set TP/SL
  • Spot trading - Place limit and market orders, cancel orders, and view holdings, reservations, and trade history
  • Account management - Multi-account support with encrypted local storage
  • Market data - Prices, orderbooks, and real-time WebSocket streaming
The CLI requires a Node API token for authentication. Get yours from Geomi before starting.
The CLI also ships with a built-in MCP server with 36 tools, enabling AI agents like Claude to trade perpetuals and spot through natural language.

Installation

Install the CLI globally via npm, yarn, or pnpm.

Configuration

Set up accounts, environment variables, and network selection.

Command Reference

Full reference for all available commands and options.

Quick start

Perpetuals and spot

Use trade and markets for perpetuals, and spot for spot trading and market data. Each command group looks up markets only within its own product. Use the corresponding market list to find symbols available on your selected network. Spot accepts buy and sell, with sizes in base-asset units and prices in quote-asset units. It does not expose leverage, margin settings, position closing, reduce-only orders, stop orders, TP/SL, TWAP, or client order IDs.
Spot placement can return pendingCbs: true when funding is queued behind a rate-limited collateral withdrawal. The transaction succeeded, but the order is queued, not placed. Follow its order ID in spot order-history and check spot history for fills. spot cancel-all does not include queued orders; cancel those individually with spot cancel <orderId> --market <symbol>.
See the spot command reference for order behavior, available options, and cancellation limits.

Design

The CLI is designed for two audiences:
  • AI agents (primary) - Query and trading commands support --json output for machine-readable responses. The built-in MCP server exposes 36 tools for direct agent integration.
  • Human power users (secondary) - Formatted tables, color-coded output, and real-time watch mode via WebSocket.

MCP server

The CLI includes a built-in Model Context Protocol (MCP) server that allows AI agents like Claude to interact with Decibel programmatically. See the MCP Server section under the Agents tab for setup instructions and the full tool reference.