config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

type Chain struct {
	Id             int64  `yaml:"Id"`
	RpcUrl         string `yaml:"RpcUrl"`
	NativeCurrency struct {
		Symbol   string `yaml:"Symbol"`
		Decimals uint8  `yaml:"Decimals"`
	} `yaml:"NativeCurrency"`
	StablecoinCA       string `yaml:"StablecoinCA"`
	StablecoinSymbol   string `yaml:"-"`
	StablecoinDecimals uint8  `yaml:"-"`
	SlippageBps        int    `yaml:"SlippageBps"`
	DexAggregator      string `yaml:"DexAggregator"`
}

type Config

type Config struct {
	Chain               Chain               `yaml:"Chain"`
	Datapi              string              `yaml:"Datapi"`
	OkxWeb3             OkxWeb3             `yaml:"OkxWeb3"`
	ZenRows             ZenRows             `yaml:"ZenRows"`
	DeepSeek            DeepSeek            `yaml:"DeepSeek"`
	Sock5Proxy          Sock5Proxy          `yaml:"Sock5Proxy"`
	LoreFilter          LoreFilter          `yaml:"LoreFilter"`
	TelegramBot         TelegramBot         `yaml:"TelegramBot"`
	DefaultGridSettings DefaultGridSettings `yaml:"DefaultGridSettings"`
	QuickStartSettings  QuickStartSettings  `yaml:"QuickStartSettings"`
	TokenRequirements   TokenRequirements   `yaml:"TokenRequirements"`
}

func LoadFromFile

func LoadFromFile(filename string) (*Config, error)

type DeepSeek

type DeepSeek struct {
	Apikey string `yaml:"Apikey"`
}

type DefaultGridSettings

type DefaultGridSettings struct {
	OrderSize             decimal.Decimal `yaml:"OrderSize"`
	MaxGridLimit          int             `yaml:"MaxGridLimit"`
	StopLossExit          decimal.Decimal `yaml:"StopLossExit"`
	TakeProfitExit        decimal.Decimal `yaml:"TakeProfitExit"`
	TakeProfitRatio       decimal.Decimal `yaml:"TakeProfitRatio"`
	EnableAutoExit        bool            `yaml:"EnableAutoExit"`
	LastKlineVolume       decimal.Decimal `yaml:"LastKlineVolume"`
	FiveKlineVolume       decimal.Decimal `yaml:"FiveKlineVolume"`
	GlobalTakeProfitRatio decimal.Decimal `yaml:"GlobalTakeProfitRatio"`
	DropOn                bool            `yaml:"DropOn"`
	CandlesToCheck        int             `yaml:"CandlesToCheck"`
	DropThreshold         decimal.Decimal `yaml:"DropThreshold"`
}

func (*DefaultGridSettings) Validate

func (c *DefaultGridSettings) Validate() error

type LoreFilter

type LoreFilter struct {
	MinHolder int `yaml:"MinHolder"`
}

type OkxWeb3

type OkxWeb3 struct {
	Apikey     string `yaml:"Apikey"`
	Secretkey  string `yaml:"Secretkey"`
	Passphrase string `yaml:"Passphrase"`
}

type QuickStartSettings

type QuickStartSettings struct {
	OrderSize             decimal.Decimal `yaml:"OrderSize"`
	MaxGridLimit          int             `yaml:"MaxGridLimit"`
	StopLossExit          decimal.Decimal `yaml:"StopLossExit"`
	TakeProfitExit        decimal.Decimal `yaml:"TakeProfitExit"`
	TakeProfitRatio       decimal.Decimal `yaml:"TakeProfitRatio"`
	EnableAutoExit        bool            `yaml:"EnableAutoExit"`
	LastKlineVolume       decimal.Decimal `yaml:"LastKlineVolume"`
	FiveKlineVolume       decimal.Decimal `yaml:"FiveKlineVolume"`
	UpperPriceBound       decimal.Decimal `yaml:"UpperPriceBound"`
	LowerPriceBound       decimal.Decimal `yaml:"LowerPriceBound"`
	GlobalTakeProfitRatio decimal.Decimal `yaml:"GlobalTakeProfitRatio"`
	DropOn                bool            `yaml:"DropOn"`
	CandlesToCheck        int             `yaml:"CandlesToCheck"`
	DropThreshold         decimal.Decimal `yaml:"DropThreshold"`
}

type Sock5Proxy

type Sock5Proxy struct {
	Host   string `yaml:"Host"`
	Port   int32  `yaml:"Port"`
	Enable bool   `yaml:"Enable"`
}

type TelegramBot

type TelegramBot struct {
	Debug     bool    `yaml:"Debug"`
	ApiToken  string  `yaml:"ApiToken"`
	WhiteList []int64 `yaml:"WhiteList"`
}

func (*TelegramBot) IsWhiteListUser

func (c *TelegramBot) IsWhiteListUser(userId int64) bool

type TokenRequirements

type TokenRequirements struct {
	MinMarketCap       decimal.Decimal `yaml:"MinMarketCap"`
	MinHolderCount     int             `yaml:"MinHolderCount"`
	MinTokenAgeMinutes int             `yaml:"MinTokenAgeMinutes"`
	MaxTokenAgeMinutes int             `yaml:"MaxTokenAgeMinutes"`
}

type ZenRows

type ZenRows struct {
	Apikey              string `yaml:"Apikey"`
	FetchTokenCandles   bool   `yaml:"FetchTokenCandles"`
	FetchTokenHolders   bool   `yaml:"FetchTokenHolders"`
	FetchWalletHoldings bool   `yaml:"FetchWalletHoldings"`
}

Jump to

Keyboard shortcuts

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