CLI Command Reference
Every command the tokenbot CLI ships. Run tokenbot --help, or tokenbot <command> --help, to see
the same information from the binary itself.
Global Options
Section titled “Global Options”| Flag | Description |
|---|---|
--json | Output results as JSON for piping to other tools |
--config <path> | Override the config directory (sets TOKENBOT_HOME) |
--version | Print the CLI version |
--help | Show help for any command |
--json always emits a well-formed array — [] when empty — so scripts never need to special-case
the no-rows path. It also suppresses incidental human-facing text, keeping stdout valid JSON.
Identity
Section titled “Identity”Generate a CLI identity and register it with TokenBot.
| Flag | Description |
|---|---|
--api-url <url> | Override the TokenBot API URL |
--ws-url <url> | Override the TokenBot WebSocket URL |
--label <label> | Human-friendly label for this CLI identity |
tokenbot init --label "work laptop"whoami
Section titled “whoami”Print the active CLI identity and server-side account info.
Confirm the CLI identity is configured. Use tokenbot init to register a new one.
logout
Section titled “logout”Delete the local CLI config and encrypted key store.
Local credentials
Section titled “Local credentials”Manage local-only exchange API credentials. These are encrypted in ~/.tokenbot/keys.json and
never transmitted.
| Subcommand | Flags | Description |
|---|---|---|
add | --strategy <id>, --copier <id>, --exchange <name> | Add or replace a credential, bound to a strategy or copier |
list | — | List all stored credential labels |
remove <label> | — | Delete the credential stored under <label> |
tokenbot keys add --exchange binance --strategy strat_9fbalance
Section titled “balance”Fetch exchange balances locally via ccxt, using credentials from keys.
| Flag | Description |
|---|---|
--strategy <id> | Show balance for this strategy |
--copier <id> | Show balance for this copier |
--all | Show balances for every stored credential |
Strategies and copiers
Section titled “Strategies and copiers”strategy
Section titled “strategy”Manage trading strategies. A Strategy is the leader that copiers follow.
| Subcommand | Flags | Description |
|---|---|---|
list | — | List all strategies you own |
show <id> | — | Show a single strategy as JSON |
add | --name, --description, --exchange-account-id, --public | Create a strategy (interactive) |
delete <id> | — | Delete a strategy (double-confirm) |
Columns: id, name, status, active, public, exchange.
copier
Section titled “copier”Manage copy-trading subscriptions. A Copier follows a Strategy.
| Subcommand | Flags | Description |
|---|---|---|
list | — | List all copiers you own |
show <id> | — | Show a single copier as JSON |
add | --strategy, --exchange-account-id, --name, --allocation <0-100> | Create a copier (interactive) |
delete <id> | — | Delete a copier (double-confirm) |
Columns: id, name, strategy, exchange, status, active, allocation %.
link / unlink / links
Section titled “link / unlink / links”Bind and inspect the copier↔strategy relationship. Both link and unlink take flags, not
positional ids, and both flags are required.
| Command | Flags | Description |
|---|---|---|
link | --strategy <id>, --copier <id> | Bind a copier to a strategy |
unlink | --strategy <id>, --copier <id> | Detach a copier from a strategy |
links list | — | List every copier alongside the strategy it follows |
tokenbot link --copier cop_2d10 --strategy strat_9funlink requires --strategy for clarity even though the copier id is the lookup key.
Activity
Section titled “Activity”trades
Section titled “trades”List trades executed on your account.
| Flag | Description |
|---|---|
--strategy <id> | Only trades from this strategy |
--symbol <pair> | Only trades for this pair (e.g. BTC/USDT) |
--side <side> | Filter by side: buy or sell |
--since <date> | Executed on or after this date |
--until <date> | Executed on or before this date |
--limit <n> | Maximum rows to show |
--page <n> | Page past the first --limit rows |
Columns: executed (utc), symbol, side, status, qty, price, pnl, strategy, id.
Ids are shortened for display; --json carries the full values.
Exchange accounts
Section titled “Exchange accounts”exchange
Section titled “exchange”Manage server-side exchange account links. Distinct from keys, which is local-only — see
Exchange Accounts.
| Subcommand | Flags | Description |
|---|---|---|
list | — | List your registered exchange accounts |
add | --exchange, --account-name, --trading-type | Register an exchange account (interactive) |
supported | — | List exchanges the server will connect to |
--trading-type accepts spot, margin or perpetual.
Integrations
Section titled “Integrations”webhooks
Section titled “webhooks”Manage outbound webhook endpoints.
| Subcommand | Flags | Description |
|---|---|---|
list | — | List all webhook endpoints |
add | --url, --events, --description | Register an endpoint (--events is comma-separated) |
remove <id> | — | Delete an endpoint (double-confirm) |
test <id> | — | Send a test event to an endpoint |
apikey
Section titled “apikey”Manage server-side API keys — for your own integrations against the REST and GraphQL APIs. The CLI itself does not authenticate with these; it signs requests with your identity key.
| Subcommand | Flags | Description |
|---|---|---|
list | — | List active keys (without secrets) |
create | --name, --description, --env, --permissions | Create a key — the secret prints exactly once |
revoke <id> | — | Revoke a key (double-confirm) |
--env accepts live or test and defaults to live. --permissions is comma-separated.
Rewards
Section titled “Rewards”rewards
Section titled “rewards”| Subcommand | Description |
|---|---|
show | Show the rewards summary |
refer | Print your referral code |

