Skip to main content

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:
  1. --account <alias> flag - Use a named account from local storage
  2. DECIBEL_PRIVATE_KEY environment variable - API wallet private key
  3. DECIBEL_SUBACCOUNT_ADDRESS environment variable - Subaccount address (read-only operations)
  4. 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

Network selection

The CLI supports four networks: Set the network with the --network flag or DECIBEL_NETWORK environment variable:
The default network is testnet.

Environment variables

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:

MCP server

The CLI includes a built-in MCP server for AI agent integration. See the MCP Server Installation page for setup instructions.