Skip to content

FAQ

Basics

What is cTrader CLI?

cTrader CLI is a command-line tool that manages account, trading and algo operations directly from a terminal, without opening the cTrader desktop application. You type commands to sign in, read market data, place and manage trades, and run, backtest and optimise cBots.

What do I need before I can run cTrader CLI?

You need a cTrader ID with at least one trading account, the cTrader CLI binary on your PATH, and a cTrader ID credentials file.

How do I install cTrader CLI?

Use a package manager on Windows, macOS and Linux. It downloads the correct build for your operating system. A Docker image is also available, and on Windows the executable ships with the cTrader desktop application.

Is cTrader CLI free?

Yes. cTrader CLI is included with cTrader. You provide your own cTrader ID, a credentials file, and a hosting environment if you run cBots unattended.

AI agents

Can I use an AI assistant with cTrader CLI?

Yes. cTrader CLI supports two workflows: type and script the commands yourself, or describe goals in natural language and have an AI assistant draft cTrader CLI commands for you to review and run.

Do I need to install a skill to use an AI assistant?

No. An AI assistant can draft cTrader CLI commands without one. Installing skills gives the agent reference material on the command syntax, output and safety rules, so the commands it produces are more reliable.

What should I review before letting an AI run a command?

Do not let an AI assistant start the long-running run command on its own, and review every AI-generated command before running it against a live account.

Auth and creds

What are the authentication conventions?

cTrader CLI uses two authentication conventions. The batch convention needs --ctid and --pwd-file; the interactive convention needs --ctid, --password or --pwd-file, and -q. Batch commands reject --password; interactive commands accept either.

How do I store my password safely?

Save your cTID password in a plain-text file. Keep the file outside shared or version-controlled folders, restrict who can read it and delete it when it is no longer needed.

Which broker should I pick when accounts share a number?

Add --broker=<broker-name> to any command. The flag picks the broker when your cTrader ID has accounts that share a number across brokers.

Workflows

What operations does cTrader CLI support?

cTrader CLI operations cover accounts, trading, market data, history, indicators, alerts, cBots and projects.

Why does deals return fewer trades than I expected?

deals returns closed trades only, and one call returns only the latest 200 in the range. Without --from / --to, it returns only the last 30 days. The range itself has no length limit. To get every trade, split the range into shorter parts and run deals once per part. orders-history works the same way, with a limit of 500 orders per call.

Which time zone does cTrader CLI use?

UTC, for every date and time in input and output. For example, --from=2026-10-08 starts at 00:00 UTC on 8 October, and the output shows times such as 2026-10-08T14:05:00.000Z. The only exception is time inside a running cBot, which follows the cBot's TimeZone setting.

Can I set more than one take-profit level on a trade?

No. cTrader CLI currently supports only one take-profit level per trade.

Can I set a trailing stop loss or break-even protection?

No. Neither is currently available in cTrader CLI.

Can I set an expiry date for a pending order?

No. Order expiry (good till date) is currently unavailable in cTrader CLI.

Can I set a market range?

No. Market range is currently unavailable in cTrader CLI. The --limit-range option applies to stop-limit orders.

Can I choose a stop trigger method?

No. Stop trigger method selection is currently unavailable in cTrader CLI.

How do I list every period token the CLI accepts?

Run ctrader-cli periods. The command prints every token accepted by --period and --timeframe. Parsing is case-insensitive.

How do I run a cBot on a VPS or cloud server?

Run the cBot inside the cTrader CLI Docker image with the host folder mounted and configuration values passed through environment variables.

cBot lifecycle

What .NET version does my cBot need?

The .algo file must be built for .NET 8. Recompile older cBots in the latest cTrader desktop application.

How do I start a cBot from the terminal?

Run ctrader-cli run <path-to-algo-file> --account=<account-id> --symbol=<symbol> --period=<period>. The command is long-running, so use --exit-on-stop if you want the cTrader CLI process to exit when the cBot stops.

How do I stop every running cBot at once?

Open the interactive shell with ctrader-cli, sign in, and run stop all yes. The cTrader CLI process exits when the last instance stops.

How do I pass cBot parameters?

Pass cBot parameters in one of three ways: rely on the cBot's defaults, override one or two values through --ParameterName=value on the command line, or pass a saved .cbotset file as the second positional argument. .cbotset files come from the cTrader desktop application and reuse values across runs.

How do I optimise a cBot's parameters?

Optimise a cBot by running ctrader-cli optimize <path-to-algo-file> --params=<path-to-params-file>, where the JSON parameters file declares which parameters to sweep and which to hold fixed. Use --criteria for standard rankings, or --fitness for the cBot's own GetFitness method.

Need cTrader support?

Reach out through our official channels to resolve any issues:

  • Ask questions and connect with traders, developers and other users in the cTrader Discord community.
  • Contact the cTrader support team at support@ctrader.com for technical assistance.
  • Browse archived discussions on the cTrader Community forum. While the forum is no longer open for new posts, it is full of helpful answers to common issues.