config

package
v0.0.0-...-e4b966e Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LogLevel       zapcore.LevelEnabler
	InstrumentFIGI string                   `validate:"required"`
	CandleInterval investapi.CandleInterval `validate:"required"`
	StopLossIndent float64
	TradedQuantity int64 `validate:"gte=1"`
	Tinkoff        TinkoffConfig
	Strategy       StrategyConfig
}

func Parse

func Parse() (Config, error)

func (Config) Safe

func (c Config) Safe() Config

type StrategyConfig

type StrategyConfig struct {
	FastEmaSmoothInterval int `validate:"required"`
	SlowEmaSmoothInterval int `validate:"required"`
	FlatMaxDiff           float64
}

type TinkoffConfig

type TinkoffConfig struct {
	Token     string `validate:"required"`
	AccountID string `validate:"required"`
}

Jump to

Keyboard shortcuts

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