options

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 21, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InitCommands = &cobra.Command{
	Use:   "systemtrading",
	Short: "Add arguments for system trading",
	Args:  cobra.NoArgs,
}

Functions

This section is empty.

Types

type BuyEveryDayIfBelowAverage

type BuyEveryDayIfBelowAverage struct {
	BuyEveryDayIfBelowAverage BuyEveryDayIfBelowAverageConfig `yaml:"BuyEveryDayIfBelowAverage"`
}

type BuyEveryDayIfBelowAverageConfig

type BuyEveryDayIfBelowAverageConfig struct {
	// "12:00"
	ExecutionTime   string                  `yaml:"ExecutionTime"`
	CodeAndQuantity []order.CodeAndQuantity `yaml:"CodeAndQuantity"`
}

type BuyEveryDayIfLowerThan

type BuyEveryDayIfLowerThan struct {
	BuyEveryDayIfLowerThan BuyEveryDayIfLowerThanConfig `yaml:"BuyEveryDayIfLowerThan"`
}

type BuyEveryDayIfLowerThanConfig

type BuyEveryDayIfLowerThanConfig struct {
	ExecutionTime           string                 `yaml:"ExecutionTime"`
	CodeAndQuantityAndPrice []order.StrategryOrder `yaml:"CodeAndQuantityAndPrice"`
}

type MetricSet

type MetricSet map[string]struct{}

type Options

type Options struct {
	Help bool `yaml:"help"`

	TelegramChatId int64  `yaml:"telegram_chat_id"`
	TelegramToken  string `yaml:"telegram_token"`

	KoreaInvestmentUrl    string `yaml:"koreainvestment_url"`
	KoreaInvestmentAppKey string `yaml:"koreainvestment_appkey"`
	KoreaInvestmentSecret string `yaml:"koreainvestment_appsecret"`

	// KoreaInvestment Account. It has `0000000-00` pattern.
	KoreaInvestmentAccount string `yaml:"koreainvestment_account"`

	// filled out when the config file has relevant configs.
	BuyEveryDayIfBelowAverageConfig BuyEveryDayIfBelowAverage
	BuyEveryDayIfLowerThanConfig    BuyEveryDayIfLowerThan
	SellEveryDayIfHigherThanConfig  SellEveryDayIfHigherThan

	ConfigFile string
	// contains filtered or unexported fields
}

A list of configuratable parameters.

func NewOptions

func NewOptions() *Options

func (*Options) AddFlags

func (o *Options) AddFlags(cmd *cobra.Command)

func (*Options) GetConfigFile

func (o *Options) GetConfigFile() string

func (*Options) Parse

func (o *Options) Parse() error

func (*Options) Validate

func (o *Options) Validate() error

type SellEveryDayIfHigherThan added in v0.1.6

type SellEveryDayIfHigherThan struct {
	SellEveryDayIfLowerThan SellEveryDayIfHigherThanConfig `yaml:"SellEveryDayIfHigherThan"`
}

type SellEveryDayIfHigherThanConfig added in v0.1.6

type SellEveryDayIfHigherThanConfig struct {
	ExecutionTime           string                 `yaml:"ExecutionTime"`
	CodeAndQuantityAndPrice []order.StrategryOrder `yaml:"CodeAndQuantityAndPrice"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL