CLI vs. Trader Comparison Table
Dear user, this chapter summarizes the commands available in the Trader Shell (command-line interface) and the problems they solve. The help and real-time output in the shell are in English; the table below is in Chinese.
How to enter the Shell > Run qt.run(op, mode=0, …) with live_trade_ui_type=’cli’, or add –ui cli when running the example. Once in the Shell, you can enter commands at the prompt, as if talking to a trader.
Scope of application
Entry method:
qt.run(op, mode=0, ...)andlive_trade_ui_type='cli'(or example ``–ui cli`)DEBUG Mode: run –task … and several debugging tasks are only available when Trader is set to debug=True (start with –debug, or switch using the debug command in the shell).
The help output is visible to the user in English; the documentation is in Chinese.
Command aliases
Trader Shell supports short aliases, reducing typing. Aliases are rewritten to the official command names within qteasy before execution—help and logs still use the official names. The table below lists only aliases related to operations and maintenance; see the “Capability Comparison Table” later for complete command details.
The meaning of each column: The alias you entered is the form accepted by the shell; the internal command is the actual name of the do_* processor that is invoked.
How to use: When using hyphenated notation, look up the left column; when referencing a formal name in a script or document, use the right column. For example, if a debugging document uses ``gate`, you can also type ``startup-gate`.
Example: When checking the log path, entering ls-artifacts has the same effect as artifacts.
The alias you entered |
Internal commands |
|---|---|
ls-artifacts |
artifacts |
live-config |
liveconfig |
startup-gate |
gate |
|
reconcile |
rotate-logs |
rotatelogs |
pull-state |
sync |
Ability Comparison Table
This table is the main index for Trader/Broker public capabilities and Shell commands: the left side shows “What qteasy can do”, the middle shows “What you should enter”, and the right side shows “Is it implemented in the current version?”. In the live subsystem, CLI is one of the main entry points for operations and smoke; the API column allows you to call the same capabilities in Notebooks or scripts.
Meaning of each column:
Capabilities: Trader/Broker side functional domain
Typical Use Cases: When do you need to use it (troubleshooting scenarios)?
Binding API (Summary): Python side entry point (incomplete signature)
CLI command: Shell name; – indicates no direct CLI command.
Status: Supported / Reserved (Not yet implemented)
How to use: Search by “typical use”—for example, to find the log directory → search for “where are the log files located” → use artifacts. Do not treat a status of reserved as a fault (e.g., sync).
Example: To check the live configuration after startup → Typical use case: “Check if the current live configuration is effective” → Command liveconfig or live-config.
capacity |
Typical use cases |
API Binding (Summary) |
CLI command |
Status |
|---|---|---|---|---|
Status / Paused / Exit |
Check if it’s running, paused/resume, or exiting the shell. |
|
|
Supported |
Manual order placement / order cancellation |
Manual order testing or cancellation |
|
|
Supported |
Configure read/write |
View or modify the running configuration |
|
config |
Supported |
Disk artifact path |
Find where the log files are located |
|
|
Supported |
Live Configuration Summary |
Check if the current live configuration is effective. |
|
|
Supported |
Task queue |
View queued tasks, cancel tasks |
|
|
Supported |
Activate access control |
Manually run a pre-market check |
run_startup_gate |
gate / startup-gate |
Supported |
Reconciliation Snapshot |
View reconciliation JSON at closing time, etc. |
|
|
Supported |
On-transit diagnostic |
Local vs. Remote in-transit order differences (read-only) |
|
|
Supported |
Log rotation |
Manually clean up expired CSV/risk logs |
qt.rotate_trade_logs |
|
Supported |
Broker Session |
Check if the simulated brokerage is “connected”. |
Implement connect / disconnect / is_connected |
|
Supported |
Remote status synchronization |
Pulling status from real brokerage firms (not yet implemented) |
(Reserved for the sync_from_broker class API) |
sync / pull-state |
Reserved |
Main loop lifecycle |
Script/Notebook side start/stop |
|
— |
Operator/Notebook only |
7.1 Dashboard and Interactive Mode
Upon startup, it defaults to dashboard mode: The terminal displays a single line at the bottom showing the countdown to the next task, monitored prices, and system messages; the Trader main loop continues running in the background. Press Ctrl+C to switch modes or exit.
1 — Enter interactive (command) mode by typing buy, config, artifacts, etc.
2 — Back to dashboard
3 — Exit Shell and stop Trader
If no input is received within 5 seconds, the system will automatically resume from the mode before the interruption; during the menu wait period, **press Ctrl+C again to exit immediately. Typing ``dashboard` in command mode will return you to the dashboard. If the main loop encounters an unexpected exception, it will return to the dashboard after 5 seconds by default (press 3 to exit).
DEBUG run --task whitelist
Only in DEBUG mode can it be manually triggered via run –task TASK (either at startup with –debug or within the shell with debug):
process_result
pre_open/open_market/close_market/post_closerefill (arguments passed via –args)
diagnose_pending_orders
Broker subcommand
broker status — Prints broker name, connection status, etc.
broker connect — Establishes an adaptation layer session (simulator is a flag).
broker disconnect — disconnect the session
Reserved: sync
The sync or pull-state functions will prompt an error indicating that they are not yet implemented, for example:
[NOT_IMPLEMENTED] sync_from_broker is reserved for QMT broker integration (S2.1-b).
Meaning: The actual “synchronized holdings/orders from brokerage firms” have not yet been integrated; seeing this message is expected behavior and not a malfunction.
Related documents
Snapshot / Access Control / Order Rejection: Policy snapshots, access control activation, and long-term observability (5-A / 5-B / 5-C)
Manual smoke: Simulated live trading manual smoke generation solution (live_grid_multi)
Products and Troubleshooting: Product list and troubleshooting
Configuration and Startup: Simulated trading platform: configuration and operation