Documentation Index
Fetch the complete documentation index at: https://docs.decibel.trade/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
The CLI uses API wallets for signing transactions on behalf of your Decibel subaccount. API wallets can be created at app.decibel.trade/api. They allow programmatic trading without permitting deposits or withdrawals.
The CLI resolves credentials in this order:
--account <alias> flag - Use a named account from local storage
DECIBEL_PRIVATE_KEY environment variable - API wallet private key
DECIBEL_SUBACCOUNT_ADDRESS environment variable - Subaccount address (read-only operations)
- Default account from local storage (
~/.decibel/data.db)
Adding an account
Run the interactive setup:
You’ll be prompted for:
- Subaccount address - Your Decibel subaccount address (starts with
0x)
- Account type -
api-wallet (for trading) or read-only (for monitoring)
- Private key - API wallet private key (for
api-wallet type only)
- Alias - A short name like
main, trading, or bot
- Set as default - Whether to use this account by default
Accounts are stored locally in ~/.decibel/data.db with private keys encrypted at rest.
Managing accounts
decibel-cli account ls # List all accounts
decibel-cli account set-default # Change the default account
decibel-cli account remove # Remove an account
decibel-cli account info # Show balances and equity
Network selection
The CLI supports four networks:
| Network | Description |
|---|
mainnet | Production (real funds) |
testnet | Public testnet |
local | Local development |
Set the network with the --network flag or DECIBEL_NETWORK environment variable:
# Per-command
decibel-cli markets ls --network testnet
# Or set globally
export DECIBEL_NETWORK=testnet
The default network is testnet.
Environment variables
| Variable | Description |
|---|
DECIBEL_PRIVATE_KEY | API wallet private key for signing transactions |
DECIBEL_SUBACCOUNT_ADDRESS | Subaccount address for read operations |
DECIBEL_ACCOUNT_ALIAS | Account alias from stored accounts |
DECIBEL_NETWORK | Network (mainnet, testnet, local) |
DECIBEL_NODE_API_KEY | Required. Node API key for authentication |
DECIBEL_GAS_STATION_API_KEY | Gas Station API key for sponsored transactions |
You can place these in a .env file in your working directory - the CLI loads it automatically via dotenv.
Global options
These options are available on all commands:
| Option | Description |
|---|
--json | Output in JSON format (machine-readable) |
--network <name> | Network to use |
--account <alias> | Use a specific stored account |
-h, --help | Show help for any command |
MCP server
The CLI includes a built-in MCP server for AI agent integration. See the MCP Server Installation page for setup instructions.