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 storageDECIBEL_PRIVATE_KEYenvironment variable - API wallet private keyDECIBEL_SUBACCOUNT_ADDRESSenvironment variable - Subaccount address (read-only operations)- Default account from local storage (
~/.decibel/data.db)
Adding an account
Run the interactive setup:- Subaccount address - Your Decibel subaccount address (starts with
0x) - Account type -
api-wallet(for trading) orread-only(for monitoring) - Private key - API wallet private key (for
api-wallettype only) - Alias - A short name like
main,trading, orbot - Set as default - Whether to use this account by default
~/.decibel/data.db with private keys encrypted at rest.
Managing accounts
Network selection
The CLI supports four networks:| Network | Description |
|---|---|
mainnet | Production (real funds) |
testnet | Public testnet |
local | Local development |
--network flag or DECIBEL_NETWORK environment variable:
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 |
.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 |

