strategyhandler

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: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClosePosition

func ClosePosition(ctx context.Context, svcCtx *svc.ServiceContext, botApi *tgbotapi.BotAPI, userId, chatId int64, record *ent.Strategy, data []*ent.Grid)

func DisplayStrategSettingsMenu

func DisplayStrategSettingsMenu(svcCtx *svc.ServiceContext, botApi *tgbotapi.BotAPI, update tgbotapi.Update, record *ent.Strategy) error

func DisplayStrategyDetailsMenu

func DisplayStrategyDetailsMenu(ctx context.Context, svcCtx *svc.ServiceContext, botApi *tgbotapi.BotAPI, userId int64, update tgbotapi.Update, record *ent.Strategy) error

func DisplayStrategyHomeMenu

func DisplayStrategyHomeMenu(ctx context.Context, svcCtx *svc.ServiceContext, botApi *tgbotapi.BotAPI, userId int64, update tgbotapi.Update, page int) error

func FetchTokenCandles

func FetchTokenCandles(ctx context.Context, svcCtx *svc.ServiceContext, token string, to time.Time, period string, limit int) ([]charts.Ohlc, error)

func GetStrategyDetailsText

func GetStrategyDetailsText(ctx context.Context, svcCtx *svc.ServiceContext, record *ent.Strategy) string

func InitRoutes

func InitRoutes(svcCtx *svc.ServiceContext, botApi *tgbotapi.BotAPI, router *pathrouter.Router)

Types

type ClosePositionyHandler

type ClosePositionyHandler struct {
	// contains filtered or unexported fields
}

func NewClosePositionyHandler

func NewClosePositionyHandler(svcCtx *svc.ServiceContext, botApi *tgbotapi.BotAPI) *ClosePositionyHandler

func (*ClosePositionyHandler) AddRouter

func (h *ClosePositionyHandler) AddRouter(router *pathrouter.Router)

func (ClosePositionyHandler) FormatPath

func (h ClosePositionyHandler) FormatPath(guid string) string

type DeleteStrategyHandler

type DeleteStrategyHandler struct {
	// contains filtered or unexported fields
}

func NewDeleteStrategyHandler

func NewDeleteStrategyHandler(svcCtx *svc.ServiceContext, botApi *tgbotapi.BotAPI) *DeleteStrategyHandler

func (*DeleteStrategyHandler) AddRouter

func (h *DeleteStrategyHandler) AddRouter(router *pathrouter.Router)

func (DeleteStrategyHandler) FormatPath

func (h DeleteStrategyHandler) FormatPath(guid string) string

type NewStrategyHandler

type NewStrategyHandler struct {
	// contains filtered or unexported fields
}

func NewNewStrategyHandler

func NewNewStrategyHandler(svcCtx *svc.ServiceContext, botApi *tgbotapi.BotAPI) *NewStrategyHandler

func (*NewStrategyHandler) AddRouter

func (h *NewStrategyHandler) AddRouter(router *pathrouter.Router)

func (NewStrategyHandler) FormatPath

func (h NewStrategyHandler) FormatPath() string

type QuickStartStrategyHandler

type QuickStartStrategyHandler struct {
	// contains filtered or unexported fields
}

func NewQuickStartStrategyHandler

func NewQuickStartStrategyHandler(svcCtx *svc.ServiceContext, botApi *tgbotapi.BotAPI) *QuickStartStrategyHandler

func (*QuickStartStrategyHandler) AddRouter

func (h *QuickStartStrategyHandler) AddRouter(router *pathrouter.Router)

func (QuickStartStrategyHandler) FormatPath

func (h QuickStartStrategyHandler) FormatPath(token string) string

type SettingsOption

type SettingsOption int
var (
	SettingsOptionOrderSize              SettingsOption = 1
	SettingsOptionUpperPriceBound        SettingsOption = 2
	SettingsOptionLowerPriceBound        SettingsOption = 3
	SettingsOptionTakeProfitRatio        SettingsOption = 4
	SettingsOptionEnableAutoBuy          SettingsOption = 5
	SettingsOptionEnableAutoSell         SettingsOption = 6
	SettingsOptionEnableAutoClear        SettingsOption = 7
	SettingsOptionEnablePushNotification SettingsOption = 8
	SettingsOptionLastKlineVolume        SettingsOption = 9
	SettingsOptionFiveKlineVolume        SettingsOption = 10
	SettingsOptionMaxGridLimit           SettingsOption = 11
	SettingsOptionTakeProfitExit         SettingsOption = 12
	SettingsOptionDynamicStopLoss        SettingsOption = 13
	SettingsOptionUpperBoundExit         SettingsOption = 14
	SettingsOptionDropOn                 SettingsOption = 15
	SettingsOptionCandlesToCheck         SettingsOption = 16
	SettingsOptionDropThreshold          SettingsOption = 17
	SettingsOptionStopLossExit           SettingsOption = 18
	SettingsOptionGlobalTakeProfitRatio  SettingsOption = 19
)

type StopType

type StopType string
var (
	StopTypeStop  StopType = "stop"
	StopTypeClear StopType = "clear"
)

type StrategyDetailsHandler

type StrategyDetailsHandler struct {
	// contains filtered or unexported fields
}

func NewStrategyDetailsHandler

func NewStrategyDetailsHandler(svcCtx *svc.ServiceContext, botApi *tgbotapi.BotAPI) *StrategyDetailsHandler

func (*StrategyDetailsHandler) AddRouter

func (h *StrategyDetailsHandler) AddRouter(router *pathrouter.Router)

func (StrategyDetailsHandler) FormatPath

func (h StrategyDetailsHandler) FormatPath(guid string) string

type StrategyHomeHandler

type StrategyHomeHandler struct {
	// contains filtered or unexported fields
}

func NewStrategyHomeHandler

func NewStrategyHomeHandler(svcCtx *svc.ServiceContext, botApi *tgbotapi.BotAPI) *StrategyHomeHandler

func (*StrategyHomeHandler) AddRouter

func (h *StrategyHomeHandler) AddRouter(router *pathrouter.Router)

func (StrategyHomeHandler) FormatPath

func (h StrategyHomeHandler) FormatPath(page int) string

type StrategySettingsHandler

type StrategySettingsHandler struct {
	// contains filtered or unexported fields
}

func NewStrategySettingsHandler

func NewStrategySettingsHandler(svcCtx *svc.ServiceContext, botApi *tgbotapi.BotAPI) *StrategySettingsHandler

func (*StrategySettingsHandler) AddRouter

func (h *StrategySettingsHandler) AddRouter(router *pathrouter.Router)

func (StrategySettingsHandler) FormatPath

func (h StrategySettingsHandler) FormatPath(guid string, option *SettingsOption) string

type StrategySwitchHandler

type StrategySwitchHandler struct {
	// contains filtered or unexported fields
}

func NewStrategySwitchHandler

func NewStrategySwitchHandler(svcCtx *svc.ServiceContext, botApi *tgbotapi.BotAPI) *StrategySwitchHandler

func (*StrategySwitchHandler) AddRouter

func (h *StrategySwitchHandler) AddRouter(router *pathrouter.Router)

func (StrategySwitchHandler) FormatPath

func (h StrategySwitchHandler) FormatPath(guid string) string

func (StrategySwitchHandler) FormatStopPath

func (h StrategySwitchHandler) FormatStopPath(guid string, stopType StopType) string

type StrategyTradesHandler

type StrategyTradesHandler struct {
	// contains filtered or unexported fields
}

func NewStrategyTradesHandler

func NewStrategyTradesHandler(svcCtx *svc.ServiceContext, botApi *tgbotapi.BotAPI) *StrategyTradesHandler

func (*StrategyTradesHandler) AddRouter

func (h *StrategyTradesHandler) AddRouter(router *pathrouter.Router)

func (StrategyTradesHandler) FormatPath

func (h StrategyTradesHandler) FormatPath(guid string, page int) string

Jump to

Keyboard shortcuts

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