This is the canonical runtime / engine document for trader-mcp.
The system is split into:
Immutable identity fields:
idstrategy_typeaccount_idmarket_symbolbase_currencycounter_currencyThese should stay stable and audit-friendly.
mode (off, observe, active)configSTATE_SCHEMA)off: not instantiatedobserve: instantiated, ticks enabled, trading disabledactive: instantiated, ticks enabled, trading enabledpaused: runtime freeze, not persisted as a modeThe engine reconciles DB records to runtime:
if record.mode != "off" and record.id not in running:
load_instance(record)
if record.mode == "off" and record.id in running:
unload_instance(record.id)
Default behavior:
Selective state carryover is acceptable only through engine-managed persistence.
The dashboard shows:
It does not own trading logic.