Documentation
¶
Overview ¶
Package tradingmode defines the process-wide paper vs live execution gate.
Venue order mutations follow trading_mode (or SEQ_TRADING_MODE). The default mode is always paper.
Index ¶
Constants ¶
View Source
const EnvTradingMode = "SEQ_TRADING_MODE"
EnvTradingMode optionally overrides the YAML trading_mode value.
Variables ¶
View Source
var ( // ErrPaperMode is returned by execution paths that refuse live venue // order mutations while the process is in paper mode. ErrPaperMode = errors.New("trading mode is paper: live venue order mutation refused") )
Functions ¶
func RequireLive ¶
func RequireLive() error
RequireLive returns ErrPaperMode unless the process is in live mode.
Types ¶
type Mode ¶
type Mode string
Mode is the runtime trading posture for Seq.
func Current ¶
func Current() Mode
Current returns the process-wide trading mode (defaults to paper).
func Resolve ¶
Resolve picks the effective trading mode from config and environment.
Precedence:
- SEQ_TRADING_MODE if set
- configValue (empty → paper)
Click to show internal directories.
Click to hide internal directories.