Source: src/config.py. Defines a single dataclass, BotConfig, holding all tuneable knobs for the live bot. It is constructed in main.py (build_config()) with a subset of fields overridden from environment variables β the rest keep the defaults below. See the environment reference for env-settable fields and the config field reference for the code-only fields.
@dataclass BotConfig
All fields with their defaults, units, and where they are consumed:
Connection
Field
Type
Default
Meaning / consumed in
ssid
str
""
PocketOption session ID. Passed to PocketOptionAsync(ssid=...) in src/bot.py
asset
str
"EURUSD"
Trading pair, used for candle subscription and buy()/sell()
timeframe
int
60
Candle period in seconds
AI expiry selection
Field
Type
Default
Meaning
expiry_options
tuple
(120, 300, 600)
Candidate expiries in seconds fed to ExpirySelector (60s/180s dropped in v6 as bad performers)
default_expiry
int
300
Seconds; used as the label horizon when pre-training from a dataset in src/bot.py_load_dataset()
Money management
Field
Type
Default
Meaning
base_stake
float
25.0
Minimum trade size ($), floor in MoneyManager.compute_stake()
Max simultaneously open trades (gate in _trade_loop)
ML and signals
Field
Type
Default
Meaning
warmup_candles
int
60
Candles required before the first trade (the bot enforces a floor of 60 regardless β features need β₯50 candles for SMA50)
min_confidence
float
0.63
Minimum ensemble confidence (fraction) to trade
max_confidence
float
0.85
Signals above this are rejected as likely overfit
retrain_every
int
10
partial_fit() after N new live samples
lookback
int
200
Max candle history kept (deque(maxlen=lookback))
feature_window
int
20
Rolling window (candles) passed to FeatureEngine.compute()
Signal readiness
Field
Type
Default
Meaning
signal_confirmations
int
1
Consecutive candles that must agree on direction (1 = instant)
require_indicator_alignment
bool
True
Require 2-of-3 of RSI/MACD/SMA-cross to agree with the ML direction
skip_volatile_regime
bool
False
Skip trades when regime is VOLATILE (off by default β ML decides)
min_wait_between_trades
int
60
Seconds between trade placements
Trading schedule
Field
Type
Default
Meaning
trading_hours
tuple
(0, 1, 2, 3, 4, 16, 17, 19, 20, 21, 22, 23)
UTC hours during which trading is allowed. Per the source comments, based on a 546-trade analysis showing 08β15 UTC loses money. An empty tuple disables the filter
Dataset, risk, persistence, misc
Field
Type
Default
Meaning
dataset_path
str
""
CSV for pre-training (optional; main.py overrides with "EURUSD_M1.csv")
max_consec_losses
int
3
Consecutive losses triggering a cooldown
cooldown_seconds
int
300
Cooldown duration in seconds
regime_window
int
30
Candles used by RegimeDetector.detect()
db_path
str
"trade_journal.db"
SQLite journal file
brain_path
str
"athena_po_brain.pkl"
Saved-model pickle path (main.py overrides with "athena_brain.pkl" via PO_BRAIN_PATH)
poll_interval
float
2.0
Seconds between trade-loop iterations
There are no methods and no validation β the dataclass is a plain container. Invalid combinations (e.g. base_stake > max_stake) are not rejected here.
base_stake, max_stake, kelly_fraction, and max_daily_loss directly control money at risk. Binary options trading can lose money; past performance does not guarantee future results. See the risk management guide.