This commit is contained in:
2026-05-07 09:56:21 +08:00
parent 12ffcbef6a
commit 38c579145f
12 changed files with 560 additions and 222 deletions

View File

@@ -11,6 +11,12 @@ var (
Spec SrvConfig
)
// SpotWatchItem 现货策略单标的:交易对标识 + 每笔市价买入的基础资产数量(开仓与超跌加仓相同)。
type SpotWatchItem struct {
Symbol string `yaml:"Symbol"` // 如 BTCUSDT
OrderQty float64 `yaml:"OrderQty"` // 每次开仓/加仓买入的基础币数量,须 > 0会按交易所 LOT_SIZE 向下取整
}
type SrvConfig struct {
conf.Base `yaml:",inline"`
ApiPort string `yaml:"ApiPort"`
@@ -18,6 +24,8 @@ type SrvConfig struct {
Databases *conf.DBConf `yaml:"Databases"`
BinanceApiKey string `yaml:"BinanceApiKey"`
BinanceApiSecret string `yaml:"BinanceApiSecret"`
// SpotWatchList 现货轮询标的;为空则跳过现货策略
SpotWatchList []SpotWatchItem `yaml:"SpotWatchList"`
}
func New(srvKey string) {