Config schema¶
qkt.config.yaml (project-local) configures brokers, data sources, and runtime defaults. The file is optional — qkt has sensible defaults for every field. See the qkt.config.yaml.example for an annotated template.
${VAR} substitution from environment variables works in any value.
Top-level fields¶
source: tv # default tick source for live mode
data_root: ./data # historical-data store path
starting_balance: 10000 # default starting balance for backtest reports
log_level: info # info | debug | warn | error
Bybit credentials (optional)¶
Only used when a strategy declares a BYBIT: stream.
Brokers¶
The brokers: section is keyed by profile name. Each entry has a type: discriminator that picks the broker class.
type: mt5¶
brokers:
exness:
type: mt5
gateway_url: http://localhost:5001
symbol_suffix: m # appended to qkt symbol → broker symbol
aliases: # qkt symbol → broker base name
NAS100: USTEC
US500: US500
UKOIL: XBRUSD
server_tz_offset_hours: 2 # MT5 server time → UTC subtraction
magic: 10001 # identifies orders placed by this profile
poll_interval_ms: 1000 # position-poll cadence
http_timeout_ms: 5000
retry_attempts: 3
deviation_points: 20 # market order slippage tolerance (in points)
Built-in defaults¶
Listing a profile by a built-in name (exness, icmarkets, ftmo, pepperstone) inherits its defaults. You only need to specify the fields you want to override:
Extending a base profile¶
Use extends: to base a new profile on a built-in or another user profile:
Resolution order (last wins)¶
- Built-in defaults (from
MT5DefaultProfiles) - User config:
~/.config/qkt/qkt.config.yaml - Project config:
./qkt.config.yaml(or--config <path>) - Env vars:
QKT_BROKER_<NAME>_<FIELD>=value - CLI flags on relevant commands
Required fields for a fresh profile¶
If a profile name doesn't match a built-in and doesn't extends: one, you must provide:
gateway_urlmagicserver_tz_offset_hours
Everything else has a default.
Inspect resolved profiles¶
Shows the resolved set with values pulled from defaults, file, and env.