> For the complete documentation index, see [llms.txt](https://docs.tokenbot.com/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tokenbot.com/home/11-bot-operator-clis.md).

# Bot Operator CLIs

**Advanced.** Alongside the main [`tokenbot` CLI](https://github.com/tokenbot-org/tokenbot-docs/tree/main/home/05-cli-reference/README.md), each automated engine ships its own **operator CLI** for working with that engine directly: `tokenbot-mm` for the market-maker and `tokenbot-trading` for the trading bot.

These are embedded with their respective bot services (the bots themselves run as scheduled AWS Lambda cycles). The operator CLIs reuse the same encrypted identity and local-key model as the main `tokenbot` CLI — run `init` once to register a CLI identity, then `keys add` to store local exchange credentials in `~/.tokenbot`.

> Most users never need these. Reach for them only if you operate a bot engine directly.

> **What changed in July 2026:** the engines' dashboard-era HTTP APIs — and the `/v1/trading-bot/*` / `/v1/market-maker/*` REST proxies in front of them — have been removed (they were never wired up in any deployed environment). The operator CLIs now work exclusively through the central platform APIs (`api.tokenbot.com` REST and `gql-api.tokenbot.com` GraphQL), with live streams over the signed graphql-ws `tradeSignal` / `orderbookUpdate` subscriptions. Remote engine control (pause / resume / emergency-stop) went with that surface and returns in a future **signed control-plane** wave.

Both CLIs share these global options:

| Flag              | Description                                                                       |
| ----------------- | --------------------------------------------------------------------------------- |
| `--json`          | Emit machine-readable JSON instead of tables                                      |
| `--config <path>` | Use an alternate config directory (sets `TOKENBOT_HOME`) instead of `~/.tokenbot` |
| `--version`       | Print the CLI version                                                             |
| `--help`          | Show help for any command                                                         |

***

## `tokenbot-mm` — Market-Maker Operator

Operator surface for the market-maker engine, which runs a quoting cycle every **\~5 minutes**.

### Setup

| Command                                     | Description                                                                                                            |
| ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `tokenbot-mm init`                          | Generate a CLI identity and register it with TokenBot. Options: `--api-url <url>`, `--ws-url <url>`, `--label <label>` |
| `tokenbot-mm keys add`                      | Add or replace an exchange API credential (stored locally, never sent to the server). Requires `--exchange <name>`     |
| `tokenbot-mm keys list`                     | List stored credential labels                                                                                          |
| `tokenbot-mm keys remove --exchange <name>` | Delete the stored credential for an exchange                                                                           |
| `tokenbot-mm balance --exchange <name>`     | Fetch exchange balance locally via CCXT                                                                                |

### Live order book

| Command                                                       | Description                                                                                                                                                                             |
| ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `tokenbot-mm orderbook watch --exchange <id> --symbol <pair>` | Stream live order-book snapshots (top-N bids/asks plus a freshness read-out) over the signed graphql-ws `orderbookUpdate` subscription until Ctrl-C. Option: `--depth <n>` (default 10) |

> **Removed commands:** `status`, `config show/set`, `pause`, `resume`, `emergency-stop`, `spreads adjust`, `inventory`, `analytics`, and the one-shot `orderbook show` were removed in the July 2026 prune — they depended on the market-maker's dashboard-era HTTP API, which never had a live backend. Engine control returns via the future signed control plane.

***

## `tokenbot-trading` — Trading-Bot Operator

Operator surface for the trading engine, which runs a strategy cycle every **\~15 minutes**.

### Setup

| Command                                          | Description                                                                                                            |
| ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- |
| `tokenbot-trading init`                          | Generate a CLI identity and register it with TokenBot. Options: `--api-url <url>`, `--ws-url <url>`, `--label <label>` |
| `tokenbot-trading keys add --exchange <name>`    | Add or replace the trading-bot exchange credential (stored locally)                                                    |
| `tokenbot-trading keys list`                     | List stored credential labels                                                                                          |
| `tokenbot-trading keys remove --exchange <name>` | Delete the stored credential (double-confirms)                                                                         |
| `tokenbot-trading balance --exchange <name>`     | Fetch exchange balance locally via CCXT                                                                                |

### Strategies

| Command                                  | Description                                                                                      |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------ |
| `tokenbot-trading strategy list`         | List all strategies registered for this account                                                  |
| `tokenbot-trading strategy show <id>`    | Show a single strategy as JSON                                                                   |
| `tokenbot-trading strategy add`          | Create a new strategy (interactive). Options: `--name`, `--description`, `--exchange-account-id` |
| `tokenbot-trading strategy enable <id>`  | Enable a strategy (takes effect on the next 15-minute tick)                                      |
| `tokenbot-trading strategy disable <id>` | Disable a strategy (takes effect on the next 15-minute tick)                                     |

### Activity

| Command                          | Description                                                                                                             |
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `tokenbot-trading signals watch` | Stream live trade signals over the signed graphql-ws `tradeSignal` subscription until Ctrl-C. Option: `--strategy <id>` |
| `tokenbot-trading trades`        | List recent trades. Options: `--strategy <id>`, `--symbol <pair>`, `--status <status>`, `--limit <n>`                   |

> **Removed commands:** the one-shot `signals` listing, `positions`, `backtest run/results`, and `emergency-stop` were removed in the July 2026 prune — they depended on the trading bot's dashboard-era HTTP API, which never had a live backend. Emergency-stop and other remote controls return via the future signed control plane.

***

## Next Steps

* The everyday user CLI: [The TokenBot CLI →](https://github.com/tokenbot-org/tokenbot-docs/tree/main/home/05-cli-reference/README.md)
* How the engines fit together: [How It Works →](https://github.com/tokenbot-org/tokenbot-docs/tree/main/home/03-how-it-works/README.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tokenbot.com/home/11-bot-operator-clis.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
