qmtcli can be exposed to any runtime as a local process tool. It is not tied to a specific agent
framework. OpenClaw, Hermes, Codex, Claude, Cursor-style agents, custom schedulers, and plain scripts
can all use the same stdin/stdout JSON contract.
- Name:
qmtcli - Command:
qmtcli - Primary mode: stdin JSON with
rpc, or stdin/stdout JSONL withserver - Network: none
- Credentials: none stored by this tool; QMT login stays in the local broker client
Run these before trading:
qmtcli capabilities
qmtcli schema
qmtcli examples
qmtcli doctorGet-Content examples\status.json | qmtcli rpcEquivalent request body:
{"id":"status-1","command":"status"}Start:
qmtcli serverSend one request per line:
{"id":"cap-1","command":"capabilities"}
{"id":"data-1","command":"data_call","method":"get_stock_list_in_sector","args":["沪深A股"]}Treat these as requiring explicit user approval in any agent policy:
buy- places an ordersell- places an ordercancel- cancels an ordertrade_call- arbitrary publicXtQuantTradermethod
data_call is an escape hatch for public xtquant.xtdata methods. It is usually read-only, but
agents should still inspect the requested method before calling it.
Success:
{"ok":true,"data":{},"id":"optional-echo"}Failure:
{"ok":false,"error":"message","id":"optional-echo"}