refactor(zt): migrate strategy logic to new state model

This commit is contained in:
2026-08-26 12:48:48 +08:00
parent 9604126ee7
commit 566a07fea8
7 changed files with 131 additions and 233 deletions

View File

@@ -25,16 +25,14 @@ type GlobalConfig struct {
}
type AccountConfig struct {
AccountID string `yaml:"account_id"`
HostKey string `yaml:"host_key"`
OrderTimeoutSec int `yaml:"order_timeout_seconds"`
BuyValue float64 `yaml:"buy_value"`
MinCashRatio float64 `yaml:"min_cash_ratio"`
LossTriggerPct float64 `yaml:"loss_trigger_pct"`
GridStepPct float64 `yaml:"grid_step_pct"`
MinProfitPct float64 `yaml:"min_profit_pct"`
WatchTimeoutSec int `yaml:"watch_timeout_seconds"`
ReboundThreshold float64 `yaml:"rebound_threshold"`
AccountID string `yaml:"account_id"`
HostKey string `yaml:"host_key"`
OrderTimeoutSec int `yaml:"order_timeout_seconds"`
BuyValue float64 `yaml:"buy_value"`
MinCashRatio float64 `yaml:"min_cash_ratio"`
LossTriggerPct float64 `yaml:"loss_trigger_pct"`
GridStepPct float64 `yaml:"grid_step_pct"`
MinProfitPct float64 `yaml:"min_profit_pct"`
}
// Load 根据 global.yaml 中的 hosts 映射加载当前计算机的账户配置。