Skip to main content

Module config

Module config 

Source
Expand description

Unified TOML configuration with environment variable overrides.

§Loading order

  1. Parse TOML file (or use defaults if the file is missing)
  2. Apply environment variable overrides on top

§Environment variable mapping

Env varConfig field
AGENT_MODEagent.mode
AGENT_INTERVAL_SECSagent.interval_secs
EXCHANGE_IS_MAINNETexchange.is_mainnet
EXCHANGE_VAULT_ADDRESSexchange.vault_address
RISK_MAX_POSITION_USDCrisk.max_position_usdc
RISK_MAX_LEVERAGErisk.max_leverage
RISK_MAX_OPEN_POSITIONSrisk.max_open_positions
RISK_MAX_DAILY_LOSS_USDCrisk.max_daily_loss_usdc
STRATEGY_NAMEstrategy.name
STRATEGY_COMPOSER_PROFILEstrategy.composer_profile
NOTIFIER_DISCORD_WEBHOOKnotifier.discord_webhook
NOTIFIER_ENABLEDnotifier.enabled
ANTHROPIC_API_KEYcredentials.anthropic_api_key
HYPERLIQUID_PRIVATE_KEYcredentials.hyperliquid_private_key

Structs§

AgentSection
Top-level agent behaviour settings.
AppConfig
Unified application configuration loaded from TOML with env var overrides.
CredentialsSection
Secret credentials (API keys, private keys).
ExchangeSection
Exchange connection settings.
NotifierSection
Notification settings.
RiskSection
Risk management limits.
StrategySection
Strategy selection.

Enums§

ConfigError
Errors that can occur when loading configuration.