ctrader-cli
Overview
The cTrader CLI is a headless client for the cTrader platform: accounts and symbols, market data, orders and positions, history, price alerts, and the full cBot lifecycle, all without the desktop UI.
It offers two invocation pipelines, and choosing the right one is the single most valuable thing to internalize. Batch verbs return compact machine-readable payloads for scripting. Shell-routed verbs run through the interactive command shell, which reaches a much larger command surface and returns a richer payload. The same verb can be served by either pipeline, and the pipeline you land in determines the JSON casing, the payload wrapper, and which flags are accepted. Everything below exists to make that choice deliberate rather than accidental.
The CLI runs natively on every platform. On Windows it installs with winget install Spotware.cTrader.CLI as ctrader-cli.exe; on macOS and Linux it installs from the Spotware Homebrew tap (brew tap spotware/tap https://github.com/spotware/homebrew-tap, then brew install spotware/tap/ctrader-cli) as ctrader-cli — the same CLI with identical verbs, flags, and environment variables. Command shapes throughout this skill use the Windows executable name; on macOS or Linux drop the .exe suffix and everything else carries over unchanged (references/setup.md covers the per-OS credential setup).
Behavior described here matches build 5.9.0.38; re-confirm details that matter on a newer build.
Invocation discipline
Use this template for every call, adjusting only the timeout:
timeout 30 ctrader-cli.exe <verb> [flags] -e </dev/null 1>out.txt 2>err.txt; echo "EXIT:$?"
Each element earns its place: