config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2025 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 Config

type Config struct {
	Solana              Solana              `yaml:"Solana"`
	Jupiter             Jupiter             `yaml:"Jupiter"`
	Datapi              string              `yaml:"Datapi"`
	OkxWeb3             OkxWeb3             `yaml:"OkxWeb3"`
	ZenRows             ZenRows             `yaml:"ZenRows"`
	Sock5Proxy          Sock5Proxy          `yaml:"Sock5Proxy"`
	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 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 Jupiter

type Jupiter struct {
	Url    string `yaml:"Url"`
	Apikey string `yaml:"Apikey"`
}

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 Solana

type Solana struct {
	RpcUrl        string `yaml:"RpcUrl"`
	MaxRetries    uint   `yaml:"MaxRetries"`
	SlippageBps   int    `yaml:"SlippageBps"`
	MaxLamports   int64  `yaml:"MaxLamports"`
	PriorityLevel string `yaml:"PriorityLevel"`
	DexAggregator string `yaml:"DexAggregator"`
}

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 Top100AvgCostFilter

type Top100AvgCostFilter struct {
	MinPercentage decimal.Decimal `yaml:"MinPercentage"`
	MaxPercentage decimal.Decimal `yaml:"MaxPercentage"`
}

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