2 Star 4 Fork 10

王布衣/engine

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
command_safes.go 744 Bytes
一键复制 编辑 原始数据 按行查看 历史
王布衣 提交于 2023-12-16 09:34 . 移除时间戳格式
package command
import (
"fmt"
"gitee.com/quant1x/engine/trader"
cmder "github.com/spf13/cobra"
)
var (
safesSecureType int = 0
safesSecurityCode string
)
// CmdSafes 安全类-黑白名单
var CmdSafes = &cmder.Command{
Use: "safes",
Example: Application + " safes --code=sh000001 --type=1",
Short: "黑白名单",
Run: func(cmd *cmder.Command, args []string) {
if len(safesSecurityCode) == 0 {
fmt.Println("证券代码不能为空")
return
}
trader.AddCodeToBlackList(safesSecurityCode, trader.SecureType(safesSecureType))
},
}
func initSafes() {
CmdSafes.Flags().StringVar(&safesSecurityCode, "code", "", "证券代码")
CmdSafes.Flags().IntVar(&safesSecureType, "type", 0, trader.UsageOfSecureType())
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/quant1x/engine.git
git@gitee.com:quant1x/engine.git
quant1x
engine
engine
v0.8.4

搜索帮助

Cb406eda 1850385 E526c682 1850385